Programming for Idiots (Tutorial) C++

05/04/2009 01:43 InfamousNoone#1
Yeah, so in my relation to my C# one ([Only registered and activated users can see links. Click Here To Register...]), which wasn't the best I felt I'll *try* make for it with this one. I've also got some spare time in between school, from when exams start, and a new Warlords server comes out... so yeah.

Right, so before I post any links to the videos I'd like to point out, so I don't get bitched at by people saying, "this isn't real C++", most of the things I do will be Win32 API C++. This means (most of) my code(s), and things I'll demonstrate will be Microsoft/Windows specific and will not run on OS's such as Mac (Dunno if it'd run on an OSX), or Linux, etc.

Megaupload doesn't work for you? Tough luck, get someone else to download it, and send it to you.

Feel free to ask questions.

Errata
Lesson 1 & 2 Errors - [Only registered and activated users can see links. Click Here To Register...]

Lesson one - Introduction & Variable Types:
[Only registered and activated users can see links. Click Here To Register...]

Lesson two - Console I/O
[Only registered and activated users can see links. Click Here To Register...]
05/04/2009 12:05 unknownone#2
Few comments.
In the first video, you discuss chars and wide chars being ANSI and Unicode. This isn't strictly true. wchar_ts themselves don't represent any particular character set, only the storage size of what's being used (in this case, the size of an unsigned short.)

ANSI and Unicode aren't exactly character sets anyway. One is a standards commitee, the other is a standard.

While "ANSI" is the default character encoding on the majority of Windows machines, it certainly isn't reasonable to use >128 latin characters. (especially since char is signed by default unless /J is supplied). I think a more reasonable description would be to say, chars support ASCII, but the remaining 128 values that can be held in it, are completely dependant on choice of character set (the default one is system dependant.) In other words, a char doesn't necessarily support european/accented characters (use a wchar instead to be sure.)

Unicode is the standard that covers the character sets UTF-8, UTF-16, UTF-32. UTF-8 would be the de-facto standard one, what you probably mean by the term Unicode. It works as ASCII for the first 128 characters (1 byte each), but if the highest bit in that byte is set, it will use a second character too. (ie, UTF-8 is a mix of 1 and 2, 3 or 4 byte characters). A wchar doesn't necessarily cover everything in it.

In addition to char_t and wchar_t, you can create your own, of any size. (These two are just typedefs of basic_char<T>.)

Also, in one of other vids, you mention C++ ATL. I think you mean the C++ STL (Standard Template Library). ATL is something else. Also, it wouldn't've really been an MS employee who decided to use "std", it would be the folks at ISO.
(Don't they call them STIs nowadays anyway?)

You didn't mention to #include <stdio.h> (or cstdio.h), to enable the use of printf, gets etc. I dunno whether this is included in stdafx already.
I'm not a fan of the way you make out stdafx.h to be "required" too. It's there to reduce compilation time, but I often find it more hassle to use a PCH.

Anyway, overall pretty good. I was expceting a fair few "mistakes" before watching, but you went on to mention everything needed.
05/04/2009 21:22 InfamousNoone#3
Quote:
Originally Posted by unknownone View Post
Few comments.
In the first video, you discuss chars and wide chars being ANSI and Unicode. This isn't strictly true. wchar_ts themselves don't represent any particular character set, only the storage size of what's being used (in this case, the size of an unsigned short.)

ANSI and Unicode aren't exactly character sets anyway. One is a standards commitee, the other is a standard.

While "ANSI" is the default character encoding on the majority of Windows machines, it certainly isn't reasonable to use >128 latin characters. (especially since char is signed by default unless /J is supplied). I think a more reasonable description would be to say, chars support ASCII, but the remaining 128 values that can be held in it, are completely dependant on choice of character set (the default one is system dependant.) In other words, a char doesn't necessarily support european/accented characters (use a wchar instead to be sure.)

Unicode is the standard that covers the character sets UTF-8, UTF-16, UTF-32. UTF-8 would be the de-facto standard one, what you probably mean by the term Unicode. It works as ASCII for the first 128 characters (1 byte each), but if the highest bit in that byte is set, it will use a second character too. (ie, UTF-8 is a mix of 1 and 2, 3 or 4 byte characters). A wchar doesn't necessarily cover everything in it.

In addition to char_t and wchar_t, you can create your own, of any size. (These two are just typedefs of basic_char<T>.)

Also, in one of other vids, you mention C++ ATL. I think you mean the C++ STL (Standard Template Library). ATL is something else. Also, it wouldn't've really been an MS employee who decided to use "std", it would be the folks at ISO.
(Don't they call them STIs nowadays anyway?) Yes, your right I did mean STL, thanks for catching this. They *should* be called STIs nowadays, but everyone still calls them STDs, at least, where I live.

You didn't mention to #include <stdio.h> (or cstdio.h), to enable the use of printf, gets etc. I dunno whether this is included in stdafx already.
I'm not a fan of the way you make out stdafx.h to be "required" too. It's there to reduce compilation time, but I often find it more hassle to use a PCH.
The VC++ Compiler requires stdafx.h to be included in all .cpp files, unlike other compiles, such as Dev-Cpp. However I'll mention this in my errata, thanks.

Anyway, overall pretty good. I was expceting a fair few "mistakes" before watching, but you went on to mention everything needed.
Thanks for the insight, as you know, I'm not nearly as experienced with C++ as you are. I'll reupload the videos with an errata in a text file.
05/04/2009 23:00 tao4229#4
haha double d.
05/05/2009 00:33 hok30#5
Quote:
Originally Posted by InfamousNoone View Post
Yeah, so in my relation to my C# one ([Only registered and activated users can see links. Click Here To Register...]), which wasn't the best I felt I'll *try* make for it with this one.
Love it, I'm gonna use it - do you have plans on finishing your C# series? I liked those.
06/07/2009 03:00 samig#6
Wow, someones gunna laugh at me for asking this... I've only seen video one so far, and i was wondering.. When your done the project thingy, does that become the source? Or is the source actualy a microsoft visual C++ file? this is my first step into coding >_<
06/07/2009 11:39 clintonselke#7
A really nice way to learn to program that worked for me when i was young was to read other peoples source code line by line and try to understand how it works. Then i would rewrite the code line by line better gather an understanding, then I would make changes to it to see what happens. Kinda like running experiments.

Its a really fast way to learn if anyone wants to try it.

Chow :p
06/07/2009 14:39 ace_heart#8
Quote:
Originally Posted by clintonselke View Post
A really nice way to learn to program that worked for me when i was young was to read other peoples source code line by line and try to understand how it works. Then i would rewrite the code line by line better gather an understanding, then I would make changes to it to see what happens. Kinda like running experiments.

Its a really fast way to learn if anyone wants to try it.

Chow :p
i do that before i think it's best way to good learn but most projects now without source code so i try learn step by step , i was learn make tools like "Co Yeti" when yeti post his source code and he was good teacher he answer for all my asks and helps me more until i can make his tools by self and edit it for any patches , i hope he back again
06/07/2009 14:58 ace_heart#9
Quote:
Originally Posted by InfamousNoone View Post
Yeah, so in my relation to my C# one ([Only registered and activated users can see links. Click Here To Register...]), which wasn't the best I felt I'll *try* make for it with this one. I've also got some spare time in between school, from when exams start, and a new Warlords server comes out... so yeah.

Right, so before I post any links to the videos I'd like to point out, so I don't get bitched at by people saying, "this isn't real C++", most of the things I do will be Win32 API C++. This means (most of) my code(s), and things I'll demonstrate will be Microsoft/Windows specific and will not run on OS's such as Mac (Dunno if it'd run on an OSX), or Linux, etc.

Megaupload doesn't work for you? Tough luck, get someone else to download it, and send it to you.


Feel free to ask questions.
good learn i start with u
09/02/2009 12:48 KraHen#10
Bumping, looking forward on this one
09/02/2009 16:40 soadmania#11
rofl double d xD
09/02/2009 18:45 © Haydz#12
Quote:
Originally Posted by ElDeRnEcRo View Post
Bumping, looking forward on this one
Hybrid says he has no intention to finish these, epvp is a lost cause :)
09/02/2009 20:48 KraHen#13
Quote:
Originally Posted by © Haydz View Post
Hybrid says he has no intention to finish these, epvp is a lost cause :)
IMO He should finish them anyway and post it somewhere else for those still interested :P
09/04/2009 06:39 © Haydz#14
I myself am still interested, im not efficient with c++, i still have to use msdn for alot of functions and libs :D
02/09/2012 00:21 C# Coder#15
rapidshare plz cuz mega is down