I love using visual studio than code blocks because i can easily view my applications compiled by visual studio outside visual studio but when i compile in code blocks i can't do it,i will have to view it through code blocks but visual studio not necessary......... Visual studio is the best
Yeah I use Visual Studio because it's what I was trained to use to a degree. The only thing I have left to figure out specific to the compiler itself is how to extract the program I write within it from the compiler so I can run my own program on its own and not within Visual Studio.
I love using visual studio than code blocks because i can easily view my applications compiled by visual studio outside visual studio but when i compile in code blocks i can't do it,i will have to view it through code blocks but visual studio not necessary......... Visual studio is the best
Whatever your problem might be, it's not related to the compilers you're using, it's just that you're doing it wrong.
GCC follows c++ standards very well and does not include any non-standard c++ code as much as it can.
in visual studio, c++ is influenced by .net framework e.g. you can add Garbage Collaction to a class via a _gc keyword (I don't remeber the syntax ;) ) in class definition which is not standard in c++, and many more keywords.
Also GCC supports many C++11 features that VS does not support yet.
@majidkamali1370
Both GCC and VS implement some language extensions that aren't standard. And both implement many C++11 features, neither supports all. AFAIK you cannot enable GC in unmanaged C++ in VS.
AFAIK, you can use GC as far as you don't use multiple inheritance.
It has nothing to do with inheritance, it has to do with the target. You can only use the .NET garbage collector if you are targeting a .NET assembly. If you are targeting native binary, then there is no implicit garbage collector and C++/CLI (or the older "Managed Extensions for C++") language extensions are not enabled.
Regarding Visual Studio language extensions (enabling /Za switch), without them you cannot compile any C or C++ program, just tried with this sample code (created empty project, no precompiled headers):
> If I remove <windows.h> the code compiles,
> but without windows.h header we cannot write much for windows platform, don't you think ?
Yes, but then if we are writing code specifically for the windows platform, the code is not portable anyway. Why worry about non-standard extensions; they are not going to hurt us.
The idea is that if a program consists of, say, 20 translation units, we should still be able to write, say, 16 of them in a completely portable manner.