Hi my code is for a program that divides two inputed numbers with an error handler. I am trying to create this using modules because I am learning about that. I've gotten the program to work and and just tried to refactor it with a few modules. I got it to compile but I get a c++ runtime error about the application wanting to terminate in an unusual way.
Or maybe tell us what inputs you used? I typed in one and one after I finally got all your code copy and pasted into the correct files and linked them all together. Please use the forum code tags in the future, and describe your problem more clearly. Your program ran just fine on my computer with no modification.
Here are some more details....I had trouble getting it to compile for a while and was getting a message that said something about an undefined reference to WinMain @ 16 but I think I fixed this because my compiler or IDE was set to Win App mode.
Now it compiles but when I run the .exe I get a Windows dialog that says "this application has requested to terminate the Runtime in an unusual way...Please contact the appilcations support team." The window is titled Microsoft Visual C++ Runtime Library..
I am new to using modules. I have everything in the same folder at the time of compile and the .exe gets outputted to a separate folder...is this fine...also do I have to put the module files anywhere else or just wherever im working.
I am using gcc 3.4.5 and my IDE is Sally a simple c++ IDE although I don't know why the iDE would matter.
or whatever your src files are. I just put both the ErrorHandling and Prompt into a Helpers.cpp and Helpers.h, for simplicity, but the end result is the same either way.
The version I posted should work perfectly. Use this command to compile it, with the files I posted.
It's a capital o not a zero. O vs 0, hard to tell.
It is an optimization option. I use that one for release programs, for debug you want to use -O0. The options go from 0 to 3 and s, for size. I beleive 3 is the optimal between speed and size of the program... -O2 gets the fastest program, while -Os gets the smallest. I think so at least. You can read on the man page for g++. I think the default optimization is -O0... i could be wrong.
-Wall is WarnOnAll, basically gives more verbosity by not ignoring certain things and treating them as warnings.