Yes, it’s a noob question…
I have been using Dev-C++ for all my projects so far, but it is incredibly outdated, and so where the libraries. So I opened up my copy of Visual C++ and copied the code. When I compile, a million errors pop up, as if every second line of my code is shit. I would hate to start the project again from scratch.
Question: Why is it that Dev-C++ and VC++ compile differently??? I’ve heard they use different compilers, but its still C++. The first error I looked at was an invalid comparison between a const char* and a std::string.
Anyway, is there any way to make VC++ less strict on programming, as is Dev-C++. Or are there a few major differences between Dec-C++ and VC++ compilers that I should know about.
Most of the errors seem to be std::string related, or LPCWSTR (i can fix that myself).
Sorry about this very broad and useless topic, I’m knew.
-Alex
This will not answer everything, but it might help.
By default, VC++ uses unicode while MinGW (on which DevCpp is based I believe) uses ansi.
This might explain your issues regarding strings: you’re basically passing
char*strings where most of the functions require something likewchar*.I suggest that either you fix your code so it becomes unicode compliant, or that you undefine the
UNICODEmacro in your VC++ project, if unicode is not required.As you stated, your old code was C++ and the code is C++ as well, so there shouldn’t be that much work… as long as you don’t rely on compiler specific behaviors.
Could you give us some samples of things that go terribly wrong ? We might be able to help more accurately.