Title: My C/C++ Tutorial for beginners
Description: Can someone please give it a test run?
nickeax - January 25, 2004 09:14 PM (GMT)
Hello,
I've been working on a C/C++ tutorial for beginners. It's quite detailed and goes into number systems, using the IDE/compiler, history of programming and then gets into the C/C++ language. If someone could check it out and get back to me with their opinion, I'd be very appreciative. BTW, it's not complete yet!
Please
click here to view it online, or download a bundled zip(win32).
Nick.
KTC - January 26, 2004 12:58 AM (GMT)
I've just taken a (very) quick look at it. It seems very good to me as tutorial go. Small little problem exist tho. You might want to go through your tutorial (I'm looking at the online one at the mo) and just correct things like certain font size or colour that are difficult to read and misspell words (or HTML tags). Misspelled codes can get annonying when you're just staring out and you haven't an idea how to correct it :rolleyes:
E.g. Your example codes on Page 5 doesn't display the < correctly.
Oh yeah, I'm reading it on Linux with Mozilla 1.6 at the moment and the box for your questions & answers are sometime too small.
Oh one last thing, you might want to reconsider using conio.h for a beginner tutorial as it is not a standard header...
Dante Shamest - January 26, 2004 02:46 AM (GMT)
Your tutorial is overall pretty well-written.
However, it seems a little Windows-biased. Your "Hello, world" program uses system("PAUSE");.
nickeax - January 26, 2004 02:52 AM (GMT)
KTC: Thanks a lot for the input. Admittedly, I haven't cross-browser checked it yet. I think I will play around with the colors and font a bit before I put it on my site anyway.
BTW(I think conio.h snuck in there by accident... I was using MSVC++6 for testing some of the code, and I just cut and pasted over what was already there...)
I'll get on to those errors you picked up.
Nick.
KTC - January 26, 2004 08:57 AM (GMT)
| QUOTE |
| However, it seems a little Windows-biased. Your "Hello, world" program uses system("PAUSE");. |
I'll have to agree with that but then again, the whole tutorial does revolve around using Dev-C++ and Dev-C++ include "system("PAUSE");" automatically....
Maybe you can write a little side thing sometime about using gcc say.
BTW, if you do take out conio.h and keep system("PAUSE"); do remember to inculde cstdlib :)
nickeax - January 26, 2004 11:27 AM (GMT)
All the mentioned points have been taken on board, thanks. Apart from the platform specific stuff, do you think people could learn anything from this tutorial?
Nick.
Roadhog - February 10, 2004 01:50 PM (GMT)
First off, anybody willing to share their knowledge and help others is of course,a good person. I have to agree with an earlier comment on your presentation of your knowledge. Your colour scheme needs to be changed bigtime. Blue on Black leads to sore, tired eyes my friend. Look at how clear your black on grey looks and is such an easy read. The more time a user can spend reading your tutorial, the more they will learn. I mean no offense and hope you appreciate the feedback.
You are off to a great start and I hope to revisit it once you have had time to make changes and update it.
Roadhog
John at J&S - February 11, 2004 01:00 PM (GMT)
Nick:
Newbie here, and I'm bummed out that it ends at page 8. I have the Teach yourself C++ in 24 Hours, and it's like you said, boring. Like a dictionary. I've looked at a few more on the web, same thing.
You teach.
nickeax - February 14, 2004 01:55 PM (GMT)
Gee,
thanks very much people! The only reason I make tutorials is because I am not a very good programmer and I take a long time to understand concepts. But when I finally, 'get it', I have a very clear and comfortable feeling about whatever I was learning. I like to attempt to relay this feeling to other new comers. Also, 99% of what I have learnt has come from people who offer their knowledge for free, online. I like to keep that going in my own small way.
Progress on the current C/C++ tute will be rather slow for the time being, but it will certainly be completed sooner or later. Thanks for the feedback, to everyone.
Nick.
KTC - February 14, 2004 05:01 PM (GMT)
Hmmm, those who can't do ... teach :P
Only kidding, only kidding :D (Especially so coz I think I want to go into an acadmic career :rolleyes: )
myork - February 14, 2004 08:28 PM (GMT)
Had a look through.
I like it. Some small comments. Most of my comments can be safely ignored by beginners (and so you could leave it out) as your assumptions hold for a most compilers on a PC (I use most to be accurate, but I don't personally know any compilers that would deviate from your statment).
Page 6
1) Size of word/ double word etc is architecture dependant.
word is 2 bytes on a PC (or IA-32 architecture)
2) The size of short, int, long etc is compiler dependant.
The standard only garantees the following
sizeof(char) == 1 byte
sizeof(short) <= sizeof(int) <= sizeof(long) <= sizeof(long long)
sizeof(float) <= sizeof(double) <= sizeof(long double)
Most compilers actually have options that allow you to change the size of these objects.
I am not sure if 'long long' is part of the standard though most compilers support it.
Page 7
You have the line:
| QUOTE |
| cout << "The size of a bool is " << sizeof(unsigned char) << " byte." << endl; |
In C the bool quite often typedefed to 'unsigned char' but in C++ it is a fundemental type. So you should use 'sizeof(bool)'.
KTC - February 15, 2004 01:41 AM (GMT)
| QUOTE |
| I am not sure if 'long long' is part of the standard though most compilers support it. |
It's part of C99 but not C++, although like you said, most compilers support it even for C++.
myork - February 15, 2004 02:59 AM (GMT)
Good news: The C++ commitee has agree to work with the C commitee and they are trying to bring the languages back into alignment. Yehaa....
The C commitee has also decided that they are not going to update the language any further at this point as only 1 front end fully implements the specifications. As a result they thought they should give the compilers time to catch up before they started making changes.