Sign in to follow this  
rossmills

NeHe's tutorials

Recommended Posts

Because I do not know the difference, are NeHe's tutorials written in C or C++? My project is supposed to be in C++, so have I just been wasting my time? :-( It says that it's Visual C++? Have I confused myself?

Share this post


Link to post
Share on other sites
Alright, some terminology.

C: A language. By "language", I mean a standard for how source code is written and what its effect is.

C++: A newer, more advanced language, based on C. C++ is a superset of C; any valid C code is also valid C++ code*. However, many features of C are outdated in C++ and should not be used, even though they're available.

Visual C++: An IDE and compiler which implement the C++ language. By "implement", I mean that they provide the programs necessary to convert C++ code into executable programs.

The NeHe tutorials are written in bad C++. Which is to say, C++ with a lot of those outdated C features I talked about. The code will compile fine, and the language issues won't interfere with teaching you the underlying concepts, but don't use NeHe to learn what good C++ looks like.


* (WARNING: PEDANTIC PEOPLE WILL BE SHOT ON SIGHT)

Share this post


Link to post
Share on other sites
Thanks. You're a star. This means I won't have to start my University coursework again, so I'm happy. ^_^

Even if I will have to learn C++ at a later time, seperately. I just don't have time to do that NOW.

Share this post


Link to post
Share on other sites
Quote:
Original post by rossmills
Because I do not know the difference, are NeHe's tutorials written in C or C++?

I'm pretty sure it's C.
Quote:
Original post by rossmills
My project is supposed to be in C++, so have I just been wasting my time? :-(

You haven't wasted your time, language doesn't really matter. You read these to learn OpenGL, and OpenGL is used the same way with C++ as with C.
Quote:
Original post by rossmills
It says that it's Visual C++? Have I confused myself?

Now you have confused me.

What's Visual C++? It's certainly not a programming laguage, did you mean Visual Studio C++? That's IDE.

What kind of project is it?
I don't really understand what's the point.


I was all way wrong, just pretend i haven't posted this.

Share this post


Link to post
Share on other sites
Kinda annoy me you are taking a programmer University course and don't know about C.... it was a prerequisite to apply at mine.

Share this post


Link to post
Share on other sites
Quote:
Original post by rossmills
Because I do not know the difference, are NeHe's tutorials written in C or C++?

My project is supposed to be in C++, so have I just been wasting my time? :-(

It says that it's Visual C++? Have I confused myself?


Nehe's lessons are technically C++ in that I don't think they compile in a strict C environment, but most of the techniques he uses are very "C-ish". As a general rule if a program is more functional than class-based it would typically be considered a C-style program (emphasis on the style bit) and a program built around objects (classes) would be considered a C++ program, which in the case of university/college work is probably what they are looking for unless explicitly stated otherwise.

It's also worth noting that NeHe's tutorials are generally a good example of the OpenGL basics but a bad example of coding structure and technique. Feel free to use them as a learning tool, but don't try and imitate his code.

Quote:
Original post by Dunge
Kinda annoy me you are taking a programmer University course and don't know about C.... it was a prerequisite to apply at mine.


Times have changed. Many Universities that I know of don't even teach C++ for the first couple years worth of courses (Java seems to be the most popular intro language ATM) and I haven't heard of any teaching C as a core curriculum. While I think anyone who has a good feel for the industry knows that C++/C are probably never going away, the fact is that they are no longer necessary to know to have a successful programming career.

Share this post


Link to post
Share on other sites
Quote:
Original post by Tojiro67445
Times have changed. Many Universities that I know of don't even teach C++ for the first couple years worth of courses (Java seems to be the most popular intro language ATM) and I haven't heard of any teaching C as a core curriculum. While I think anyone who has a good feel for the industry knows that C++/C are probably never going away, the fact is that they are no longer necessary to know to have a successful programming career.


As is good practice, I have started teaching myself outside of the University. The past few years have been such a mess of programming styles and methods that I needed to focus on a particular thing. I am quite profficient in OO thinking, and C++ was not particularly confusing in this regard, but I was not really aware of the difference between C and C++ so got confused when something mentioned void main() being "needed" in this program... when it isn't.

Share this post


Link to post
Share on other sites
Hey Ross

These are some good sites you may have not encountered for OpenGL/C++..
Video Tutorials Rock
Zeus CMD
Space Simulator

The best thing about these sites is that it explains in full detail what you can do with C++ and OpenGL. They have clean full sourcecode plus well written articles (especially Video Tutorials Rock as they have brilliantly illustrated video tutorials). And those sites follow better structural practices than Nehe. As the guys mentioned before me, Nehe is good for GL, but not for C++. And it is quite old now, most of the articles are nearly as old as this decade.

C++ is such a intensive language with its awesome power, I would concentrate on the language first as it has such brilliant tools like STL (Standard Template Library), which helps you develop structured object orientated programs. C is good, but like the previous guys pointed out, C is less capable as it does not allow Object Orientation programming. Trust us, Object Orientation will make game development a whole lot more structured and easier in the long run.

The best site that i have been through is CProgramming as it goes through many things like for example the difference between C and C++. And it introduces the wonderful world of Object Orientation programming.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this