I need some opinions about VC++ vs C++

This is a discussion on I need some opinions about VC++ vs C++ within the C++ Programming forums, part of the General Programming Boards category; Hi,
Im not sure if this is the right place to ask, but anyway I wanted some opinions about vc++ ...

I need some opinions about VC++ vs C++

Hi,

Im not sure if this is the right place to ask, but anyway I wanted some opinions about vc++ vs c++... Are they the same language? I mean, is vc++ the same c++ I use everyday or is there any major difference? If so, could it be considered another language? Can I program in VC++ using the same programming style I do now? And the main question: if it is different in someway(which I believe makes it another language), is there any reason to use it instead of C#?

Im familiar with C# and .NET framework, and it would be nice to write programs that use the .net framework and still do it in C++(my favourite language), but as Im not very familiar with VC++, I dont know how much difference there is, if its just the differences I've seen until now, or if it goes more deep and literally changes the language into something else.

VC++ is an implementation of the language C++. So you can't compare the two: there's really nothing to compare.

I assume your actual question would be: does VC++ implement C++ properly, so that I can use other C++ compilers as well?
The answer to that is, well... There's a lot of bloated stuff in VC++ that is meaningless for other compilers. "#pragma", for instance. Also, many things that are accepted in VC++ are still illegal and not accepted by other compilers.
But really, you shouldn't have any problem switching to another compiler if you've used VC++. You'll find out the differences soon enough.

I use GCC/G++ with Qt framework. I was thinking about giving VC++ a try, but Im not sure if its worth the time and effort since I believe it is better to use C# for .net applications than VC++ if I will have to "learn" it and/or my experience with C++ is not enough

There's a lot of bloated stuff in VC++ that is meaningless for other compilers. "#pragma", for instance.

#pragma is part of the C++ standard. Particular pragmas, also by definition in the standard, are implementation defined. The intent is that pragmas provide a compiler-specific means of controlling various compiler-specific behaviours.

Originally Posted by EVOEx

Also, many things that are accepted in VC++ are still illegal and not accepted by other compilers.
But really, you shouldn't have any problem switching to another compiler if you've used VC++. You'll find out the differences soon enough.

I wouldn't quite go that far.

Older versions of VC++ were notable for aggressive non-compliance with the standard. The compliance of recent versions of VC++ is significantly better, as Microsoft made a deliberate strategic decision to improve standard compliance. It's not 100% perfect, but is now certainly better than in the past.

What is true is that VC++ supports several extensions - both language features and library features - that are specific to Windows. There is actually nothing wrong with that. Most vendor's compilers and libraries support some extensions. However, if a programmer uses extensions that is specific to a vendor, that programmer will face challenges migrating to other compilers.

The choice of compiler really depends on what the programmer is doing - there is no C++ compiler that is perfectly suited to every development task, as there are always relative strengths and weaknesses. VC++ is eminently suitable for development under windows, which is presumably it's primary purpose. It is less suitable for other types of development.

Oh - Qt can be used with Microsoft's development tools (at least, the commercial/paid-for versions - I've never used the free ones). Like any third-party library with any compiler, some effort is required to configure and use it, but it is possible.

If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

@grumpy: Yes, I know #pragma is standard. But I've never seen it used in any compiler other than VC++. And I've seen it used a LOT in VC++.

One thing is that a lot of the Microsoft documentation gives examples using pragmas (and use void main(), but that's another story).

In practice, I don't recall using any compiler that does not support a pragma or three. The list of pragmas supported by gcc, for example, is here.

Originally Posted by EVOEx

Also, I've only used older versions of VC++, so that might explain why I consider VC++ so standard uncompliant .

Probably so. I was vocal with my criticism of Microsoft's lack of compliance to the C++ standard for quite a few years. The deficiencies in (the 32 bit) VC++ version 5 and earlier were sort-of forgivable as that version was released while the C++ standard was in draft and Microsoft was attempting to influence evolution of the standard. But some of the versions after 6.0 ..... <shudder> However, recent versions have improved.

If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

VC++ supports another language named C++\CLI. Its another story. The compiler is the same for C++ and C++/CLI. It compiles code into C++\CLI if set so by switches. But if not its like any other C++/C compiler. With some specific features and disadvantages.

C++ is not a dotCrap language and so cannot use the dotCrap framework. C++/CLI, OTOH, can. But it is an entirely different language and is not inferior to C#. In fact, it allows you to get the best of both worlds without any painful marshaling or stuff.