![]() |
An Access Violation Segmentation Fault
Hello,
i everyone, i made some code to simulate the working of a shade motor and but it dosent work because an error appear which states An Access Violation Segmentation Fault raised in your program, i dont know what to do, perhaps you guys can figure that out. Code:
#include <iostream>Best Regards, Boschow. |
Re: An Access Violation Segmentation Fault
Aside from the fact that it doesn't compile since you commented out
//MainModule *MM; You also seem to have removed (or it was never there to begin with) the statement which assigns MM to point to some real memory. As an uninitialised global, it will just be NULL and that'll get you a seg fault every time. |
Re: An Access Violation Segmentation Fault
Thanks for the advice, i come up with some solutions, which of this you think is the best choice ?
1.solution Code:
MainModule MM; // this is the objectCode:
MM = new MainModule();BoSCHoW. |
| All times are GMT +5.5. The time now is 06:09. |