What would be best to learn? C#, C++ or Objective C?

Previous topic - Next topic

Wampus

I've decided I simply can't put off learning a variation of the C language. I'm thinking I should learn C++ simply because its so widely used for computer game programming. My hesitation is that I already have many books on C# and Objective C that someone bought for me in order to try to encourage me to start learning them instead of C++.

The reason I want to learn is that for some simple but repetitive routines I would need to use in my GLBasic games it would be much faster to use things like IMPORT and INLINE to include C++ code. I'm not new to object-orientated programming because I used to program in Java some years ago so I'm guessing I shouldn't find it too hard to pick up.

C++ would be best, no? And if so, what would be a good start? What kind of development environment do you like to use? i.e. editor, compilers, interpreters? etc.

Kitty Hello

I'd start learing C, but use a book that is aware of C++, so you don't declare variables at the top and stuff.
You can do many things better with C++, but it's rather ugly syntax for beginners:

Code (glbasic) Select

C:
int* pX = (int*)malloc(16);
pX [0] = 15;
free(pX); pX=NULL;

C++:
std::vector<int>px;
px.resize(16);
px[0]=15;
// auto-free at variable out of scope.



ketil

I wold forget about plain C, because you would be confused later on when going for procedural to object oriented programming.

Object C ties you more or less to OSX (I can't imagine elsewhere you would need it), and C# ties you to Windows (or mono).
C++ makes you free to develop on whatever OS you would want.
Choose C++ for cross platform compatibility.

I recommend downloading the  QT Creator (Which is a free cross-platform IDE) and have a look at QT and C++ :)

Bottom line: C is procedural, forget it. Object C and C# is to limiting. They ties you to one platform.

"Sugar makes the world go 'round. Caffeine makes it spin faster."

Wampus

Thanks for the advice. I start tonight.  :)