Problem with main.cpp|example.h|example.cpp

I have one big problem...
- I call in main.cpp from example.h one function
- example.h has one INT and one FUNCTION.
- in example.cpp i have function, when the INT (in example.h) will change
- but when i want compare in main.cpp INT and some value, it doesn't change ( I mean that INT value)...
Added:
-the problem is, I can't get value from example.h this INT to main.cpp

And I have second problem, I don't see here forum formating. How I can repair it? (i can click on it, but it doesn't work)

Added: only if I click EDIT after the post..
Last edited on
Please post the code.
yea, i solved this problem yeasterday. I solved it this: i use int function, not void function. It's makes some stupid thngs. :) all works.
You should only use main with int return value.
Those kind of errors can be detected quickly and should be. if you're having problems detecting those y yourself you can try using a software to help you. I tend to use checkmarx these days which gives some good results.
Good luck.
Ben.
The main function must return int, otherwise it won't work. Errors like that better be detected quickly. If you have problems detecting them you can try using a program to help you.
I use checkmarx most times and get some pretty good results.
Good luck!
Ben.
Topic archived. No new replies allowed.