Hello everybiody!
I am using visual c++.Net 2003 for the first time . My programm reads a file using a read parser. I compiled the programm in debug mode...everything is fine and the results are in the output file but when I change to release mode...no resuls are given...although the programm is error free.
A message is appeared when I run the programm in Dos saying that there is a just in time error and a hint is given to the (read)function.
where is the problem exactly and how could I solve it.
Thanks for any help.
One final thing to check is which runtime libraries are being linked into your program. Release mode should not be linking with debug mode libraries. (And yes, there are zillions of different versions of runtime libraries... alas.)
Thank you Duoas!
The link you provided is very useful and my problem is summarized in the first point:
1. ASSERT() statements containing necessary code
statements being optmized/preprocssed out of the
release code. Use VERIFY() instead.
I am using a simulator that has man assert statements....the error is messaged to e in that statements...I replaced Assert with verify and I got the following error:
cpetrinet.cpp(709) : error C3861: 'VERIFY': identifier not found, even with argument-dependent lookup
I don't know. You'll have to read the simulator's documentation.
The best bet would be not to place anything that you want to keep in RELEASE mode inside an ASSERT macro. Use temporary variables (which the compiler will eliminate in RELEASE mode):
1 2
int f = fooey( 24, x );
ASSERT( f >= 0 );
Keep in mind that assertions are for validating your program, not for handling run-time errors that you can expect to occur in production operation.