VC++ or C# ???

Started by
28 comments, last by thedo 19 years, 6 months ago
Quote:Original post by hanifv

How do i use both VC++ and .NET ? i am confused ? people earlier said i cannot compile VC++ code in VS.Net . so is it that i have to keep my original visual studio with VC++ 6.0 and also install the VS.NET ?


No you asked if it was possible to compile C++ code in Visual C#. Visual Studio .NET is Visual C++ .NET, Visual C# .NET, Visual Basic .NET all in one IDE.

Quote:
thedo thanks for your valuable advice. But whats the actual difference between managed an unmanaged apps ?? ( i feel so embarassed to ask this question , lol )


Unmanaged code compiles to the native machine code that we have always been using.

Managed code is the new Microsoft paradigm that compiles to MSIL code and is JIT on the fly when run for the first time. Managed code will be the driving force behind Windows Longhorn application development obviously, taking the place of unmanaged code.

Although for games, I would expect unmanaged code to reign supreme for some time. Maybe not in "game programming".. as that can easily be done in C# with no noticable performance difference at all... but in "game engine programming" I see that staying in the realm of unmanaged code for at least a few years after Longhorn's release, if not longer. It really all depends on how optomized the JIT gets in a short amount of time.

Also remember when people compare the speed of C# applications to C++ applications it is VERY misleading. I mean it is a lot easier to develop well built and performing applications in C# than in C++. Although if you are a master of the language, obviously the unmanaged C++ will run a little faster.

I mean just look at the C# port (Axiom) of the Ogre engine, where it performs better than the unmanaged C++ a lot of the time. It is due to refactoring and better design, not because of language.

Seriously in my opinion I would just pick either C++ or C# and start writing code and games in it. The language actually means nothing unless you are writing professional quality code on commercial applications.

If you feel comfortable with C++ and you've already been using it, you might as well just keep using it. I mean in the end language means absolutely nothing.. it is the design and algorithms that are important anyways, not language syntax which can be easily picked up and refactored at any time.
Advertisement
Quote:Original post by Integra


Quote:
thedo thanks for your valuable advice. But whats the actual difference between managed an unmanaged apps ?? ( i feel so embarassed to ask this question , lol )


Unmanaged code compiles to the native machine code that we have always been using.

Managed code is the new Microsoft paradigm that compiles to MSIL code and is JIT on the fly when run for the first time. Managed code will be the driving force behind Windows Longhorn application development obviously, taking the place of unmanaged code.


Thanks for helping out. but sorry i still dont get what is managed and whats is unmanaged apps ??
Quick answer.

Get VS.Net. It is immensely superior to VS 6, it comes with compilers for C++ (managed AND unmanaged), C#, VB.Net...

Yes, standard C++ code WILL compile under VS.Net C++ compiler.

Your question is moot. Just get Visual Studio .Net, that way you'll be able to try anything. The student version is dirt cheap.
I teleported home one night; With Ron and Sid and Meg; Ron stole Meggie's heart away; And I got Sydney's leg. <> I'm blogging, emo style
Quote:Original post by hanifv
Quote:Original post by Integra


Quote:
thedo thanks for your valuable advice. But whats the actual difference between managed an unmanaged apps ?? ( i feel so embarassed to ask this question , lol )


Unmanaged code compiles to the native machine code that we have always been using.

Managed code is the new Microsoft paradigm that compiles to MSIL code and is JIT on the fly when run for the first time. Managed code will be the driving force behind Windows Longhorn application development obviously, taking the place of unmanaged code.


Thanks for helping out. but sorry i still dont get what is managed and whats is unmanaged apps ??

Unmanaged is what you've been using all along.
What is managed code?
If a plant cannot live according to its nature, it dies; so a man.
Quote:Original post by Red Falcon
MOST proffesion use c++ because its more powerfull.

C++ is powerful? In what respect?

I think having a program up and running in 70% of the time is powerful. I think one line of code doing the work of 10 in another language is powerful. What do you mean?
If a plant cannot live according to its nature, it dies; so a man.
Allow me to clarify my comments earlier (the comment was written in haste and I should have made more specific statements about the features in C# I find confining).

It is possible to do operator overloading but there are restrictions. Instruo's comments are correct, with regards to precedence - this doesn't give me a great deal of heartburn. The limitations of not being able to overload && || [] () new ? -> . and = are a little cumbersome, but not being able to overload any assignment operator bothers me. It is possible to create a conversion operators to overcome these limitations, so it is possible. IMHO, I just like the way it was. Again - not a value judgment, I just happen to like Vanilla instead of Chocolate. A more accurate statement would have been that the mechanism to achieve the result is quite different.

On the topic of Multiple Inheritance, again it not that it is not possible to achieve the result (you can do COM in assembly, but I have no interest in it..) - I just think its more complicated then it needs to be. It is certainly possible to create a hierarchy of interfaces and then use a "Private Implementation" technique to achieve the result, but I still fins some of this confining - I just like the Vanilla method.


Don’t get me wrong - C# is *very* cool and has some features in it that I think elevate it above C++ and Java (delegates for one...). My apologies for being vague/terse, I should have proof read my comments but I was in a rush for a con call. Kudos to Instruo for keeping me honest in a polite manner.


#dth-0
"C and C++ programmers seem to think that the shortest distance between two points is the great circle route on a spherical distortion of Euclidean space."Stephen Dewhurst
I have to admit in using C# I find having no multiple inheritance a bit of a pain - some of my C++ code simply wouldnt work without it. However I completely understand the reasoning behind it. I miss templates and all sorts of other things too. It's a shame that new languages have to remove useful features of older languages. I tend to see C# as a cleaner C++. The syntax is cleaner, the .net framework provides a (reasonably) coherant API (compared to Win32 API, MFC, etc etc), and a lot of really complex tasks can be greatly reduced in size due to the work put into the language.

One of my first attempts at a c# app was to convert an old C++ app which made heavy use of winsock. The app went from several thousand lines of C++ to a few hundred in C#.

I just like C#. It feels right. It runs quickly enough for me, its easy to write and debug (the IDE seems to have had more work than C++ -I miss regions when going back to C++), and theres plenty of help out there.

I really like C++ too. I still do lots of work in C++ (mainly because I'm the only guy at work who is comfortable with it). Ive done a number of conversions of unmanaged code to managed and the managed C++ is pretty ugly (compared to C#), but vanilla C++ is still really useful for everything from small console apps, to enterprise apps, to 3d rendering.

There are some things that make me go all goo-ey and those are genearally programming languages beginning with C. I never got Java, I dont like the syntax of VB, Pascal was OK but I found it hard to get my head around why some keywords were absolutely required (in an IF statement why should I have to put THEN? Surely it's implied or I wouldnt be asking. And dont get me started on WITH.......). I'm really excited by my C# compiing and executing a new C# module itself, allowing for compiled self improving algorithms (I hope to implement this in my next project). I'm looking forward to including C# scripting in my C++ app. I'm looking forward to anything I think of, and having a choice of quality tools to do it in.

Anyways

Neil
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
Quote:Original post by Guimo
Hi,

Please dont get confused.

Visual Studio and Visual Studio .Net are the same product, but VS.Net allows for Managed Programming (C#) in ADDITION to C++.

VS.Net is really more advances than Visual Studio. Better compiler also. And you can aprogram any supported language (C++, C#, VB.Net) in a single environment. Really, go for it.

Luck!
Guimo


Not strictly true, I think the new version of visual studio also comes with a new version of mfc (mfc7 rather then mfc6)
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
Thanks for all your help.

I didnt knew that VS.NET came with both VC++.NEt and C#.NET. I will soon be getting VS.NET and doing all my C++ in the VC++.NET and later will also look at C#.NET for all the features guys mentioned.

This is the path i am going to take - read some more on c++ since it is a bit rusty and i want to completely master it - then i will looking at some more small projects using VC++.NET - play a bit with C#.NET, see if i am confortable with it - and then i will be looking at some bigger projects using either VC++.NET or C#.NET or even both.

Anything you all want to addd ?
Good luck and have fun!

Neil
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

This topic is closed to new replies.

Advertisement