Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - kidlovegamedev

Pages: [1]
1
General / std::vector problem.
« on: November 25, 2010, 03:21:30 pm »
Really thanks for your answers Laurent.
I found the problem.

2
General / std::vector problem.
« on: November 25, 2010, 02:43:54 pm »
Thanks for your reply Laurent!

That is the result from debuging:
Code: [Select]
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
(no debugging symbols found)
Debugger name and version: GNU gdb 6.8
Child process PID: 3212
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Program received signal SIGSEGV, Segmentation fault.
In ?? () ()


I'm making a paths where object will move.

EDIT: That I understand is maybe I overwrite a memory?

3
General / std::vector problem.
« on: November 25, 2010, 01:56:27 pm »
Hi guys. I have a little problem with my first C++ project.

I have this code:
Code: [Select]

    //creating vectors
    std::vector<float> pathX_0;
    std::vector<float> pathY_0;
    std::vector<float> pathX_1;
    std::vector<float> pathY_1;
    //fill vectors with values - vector 0
    pathX_0.push_back(420);
    pathY_0.push_back(147);
    pathX_0.push_back(610);
    pathY_0.push_back(265);
    pathX_0.push_back(210);
    pathY_0.push_back(470);
    // vector 1
    pathX_1.push_back(430);
    pathY_1.push_back(147);
    pathX_1.push_back(620);
    pathY_1.push_back(265);
    pathX_1.push_back(230);
    pathY_1.push_back(470);


And when compile there no error or warnings. But when game start give a error "An unhandled win32 exception occured in MyGameName.exe [1940].";

When I delete a second path's push_back and code become like this:
Code: [Select]

    //creating vectors
    std::vector<float> pathX_0;
    std::vector<float> pathY_0;
    std::vector<float> pathX_1;
    std::vector<float> pathY_1;
    //fill vectors with values - vector 0
    pathX_0.push_back(420);
    pathY_0.push_back(147);
    pathX_0.push_back(610);
    pathY_0.push_back(265);
    pathX_0.push_back(210);
    pathY_0.push_back(470);


And there no error. I will be happy if someone give me a little help.
EDIT: Sorry for that i post on wrong place.

Pages: [1]