tags:

views:

900

answers:

8

Hello Friends,

I've done my C++ classes and practices after which i started learning Visual c++ using book Ivor horton's visual c++ . The problem is that i am unable to understand the language of this book and badly trying to understand the codes . I want to learn visual c++ for windows application development and making my future in that. (also cause i already know c++)

Some of my friends told me to switch to C# since it has many library fn to create GUI etc and told me it's hard to code windows appz in VC++.

Now in these holidays i am going to join classes , can you help me which language i should stick to , and which one will be easy.

from very beginning i want to learn VC++ and sometimes i think it's hard when i don't understand concept in ref books etc.

and help will be very appreciated , thanks a lot for taking your precious time for me.

+9  A: 

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

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
Stefan Monov
+1 for the first paragraph
Yacoby
+2  A: 

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.

Reed Copsey
A: 

I would learn both.

Having said that, I would create GUI/Application projects using C#, and use VC++ for any COM or device communication.

I would check out Which platform should I use : native C++ or C# ?

SwDevMan81
+3  A: 

C++ vs. C# - a Checklist from a C++ Programmers Point of View http://www.thinkingparallel.com/2007/03/06/c-vs-c-a-checklist-from-a-c-programmers-point-of-view/

Robert Harvey
A: 

Maybe consider what you are likely to want to do in the future, as a professional or a hobbyist. Programming is a wide field, in which both languages have their place. If its too early for you to make that decision, C# is probably most likely to do you good in the future.

It's worth remembering that they are both only languages - and just as writing a good book is about more than correct spelling & grammar, writing good code is about more than the details of a particular languages syntax.

Matt Gordon
A: 

C# is the premeir .net language for developing applications on the .net framework.

Native C++ is more cross platform and low level. It's used for writing applications for windows, mac, linux, embedded systems, etc.

C++.net is C++ adapted to the .net platform, and is primarily used for writing performance critical parts of an application (the rest of which is written in C#, VB.net, or something else as they integrate virtually seamlessly).

Visual C++ is microsoft's windows compiler for C++ that can be used to write native and C++.net applications.

Writing .net applications solely in C++ in much harder than writing them in C# as you have to deal with more low level issues. If you want to write .net applications, I recommend using C# and C++.net if you need it.

CrazyJugglerDrummer
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.
Stefan Monov
A: 

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.

JMSA
"C# is much slower than C++".. naah.. :)
cwap
A: 

Find out by checking the number of questions posted.

lsalamon
what does it mean that c# has ~4 times as many questions as c++? Can't say that I can draw any conclusions about which the OP should choose.
Matt Ellen