Visual C++ vs Visual C# , which is the best to learn?

Stackoverflow:

Visual C++ and Visual C# are not languages nor GUI frameworks; they are Integrated Development Environments - IDEs. This means they are text editors tailored to the task of development.

Visual C++ lets you code in C++, Visual C# lets you code in C#. Also, both let you create GUIs in a point-and-click manner.

Sounds like what you really want to do is create GUIs. In that case, without having further information, I recommend you go for C#. It is a much cleaner language than C++, it has fewer ways to shoot yourself in the foot, and it provides access to the immensely useful .NET framework.
C# features that C++ doesn’t have:

Fully automatic memory management
Lambda functions¹
Type inference¹
Reflection
Remoting
Automatic serialization
True entity types
Properties
Database integration via LINQ
Convenient functional-style programming via LINQ
No header files
No undefined behavior
Direct interoperability with many languages
Compile once, run everywhere

¹ these features have been added to C++ in the C++11 standard.
C++ features that C# doesn’t have

Template metaprogramming
Typedefs
Zero-overhead principle
Means to enforce const-correctness
Mature compilers that produce extremely optimized code nowadays
Much wider platform support

can you help me which language i should stick to , and which one will be easy.

In general, if you’re goal is to develop Windows Applications, you’ll probably find many, many more simple examples to learn from in C# than in C++. There is a huge community around C# for Windows GUI development.

That being said, many of the concepts you’ll need are the same in any language you learn. You can’t really go wrong - at some point, you’ll probably want to learn both langauges if you’re going to program professionally (as well as others).

i think it's hard when i don't understand concept in ref books etc.

You should get a beginning programming book, not reference books, and go through it step-by-step. If your goal is just GUI development, I’d recommend a good, simple C# book, and just step through it form beginning to end, and do all of the examples. Learning from a “reference” book won’t work - it’s reference material, and not meant to teach concepts.


There is no “C++.net”, you mean C++/CLR. Also, writing in C++/CLR is hard, but not because it’s lower-level (it’s not). It’s hard because the language uses C++’s old-school syntax with all the gotchas, while C# is designed from the ground up to fit with the .NET framework and to learn from C++’s mistakes.


C# is largely intended for Business Applications so as Java. Visual C# is Microsoft’s implementation of the C# programming language specification, included in the Microsoft Visual Studio suite of products.

C# is much slower than C++, since the code passes through CLR. VC++.net has the same drawback.

VC++ is very hard to learn, so as MFC and windows programming, even though you know C++. But is it a prestigious and efficient language.

It is easy to switch from VC++ to VC#. But the reverse is harder.

If you go for VC++, MFC and Windows programming, try this.


https://stackoverflow.com/questions/1981547/visual-c-vs-visual-c-sharp-which-is-the-best-to-learn

展开阅读全文

没有更多推荐了,返回首页