Why if I compile the same sourcecode on
> Dev-C++ it does not compile
> VC++ it compiles but on some computer the program does not run
> Code::Blocks it compiles and the program run on more computers
?
C++ is middle level programing language and it cannot be run on some platforms.
Some IDE's supports 'code optimization'. Enable it and your code will run on more computers.
Try to find option 'platform...' or etc.(I never used Dev-C++ and VC++) and choose platform.
Hope this helps.
+++
Platforms:
i386 - standart 32 bit PC.
i686 -64 bit PC
I don't think that's entirely an accurate response.
You have to first understand what compiler you are actually using. Dec-C++ nor Code::Blocks are compilers. Both on Windows use the MingW compiler by default, although they can support other compilers.
If the code won't compile between compilers then it's either a difference in the implementation of the C++ standard, or you have used compiler specific code (Microsoft compiler is fill of it).
If you can compile, but cannot run the program on another computer then it's 1 of 2 things usually.
1) the other compiler doesn't have the required shared libraries (dlls)
2) You have used Visual Studio .NET and the other computer doesn't have the .NET framework installed.
To see if was VC++ fault that a Win32 application did not run on a computer.
When tryed that, I got a message saying that application settings were wrong.
So I tryed compiling my Win32 program on Dev-C++ but it found many errors in my code and didn't compile.
Then I tryed Code::Blocks and it compiled and made the program running on the computer having problems
I don't have problem in compiling with VC++, I've used it a lot and on "good" computers my programs work.
But on some computers if I use a program compiled with VC++ I get an error message like this:
Error in application settings.
Reinstalling the program could solve this problem