Wow… this is a neat topic!
Glad to see so many people putting it out there so generously point to point.
If I had anything to add it is something I just recently finalized for myself in regards to the nature of greater variable structures. Spelling it out is going to help me really secure my thinking on it and give you guys a chance to tell me if I’m wrong.
So you have the basic variable types as mentioned above:
bool (binary toggle)
Int (whole number no decimal)
Float (number with order of magnitude stored)
Double Float (Float with added bits for more refined numbered)
Char (ASCII code that the program knows to reference for corresponding letter)
String (Array of variable type Char with a bunch of sub functions for easy use) "#include " to use
Those are the basics… but I want to detail Unions, Structs, and Classes.
I think unions are neat because it holds the data in the same place but a union can be called to act as divergent variable types… so for example 1010 can be read as 18… but also a char, setting the letter A at 0001 would make 1010 == “R” instead. Instead of mandating that and int always be an int… you can break the rules if you want.
Structs are cool cause the just solid and not complicated.
struct dataset(){
int a;
double b;
}
can refer to dataset.a as an integer in code… and dataset.b as a double… while only using one line to declare a new instance. Really cool for pairing up things that will always be needed together.
Class itself looks really complicated at first and I still don’t like the nomenclature regarding the word “class” itself… it’s an abstract use of the word if interpreted litterally… “Classification” is what they had to mean in the sense: This is what it is (the variable space) and this is what you can do with it (the function space).
Classes are cool… they can be used to just about anything and keep program flow neat and intense coding blocks that prone to have complicated errors all separated out into libraries where they can compiled separately and then built and compile when the whole shebang is good to go.
Public and Private… those are key words in understanding classes. Data types can be used just like with Struct so long as they are public. Publicly accessible variables from out side the class. Privates are constrained to only being manipulable by functions defined within the class.
Bah I don’t think text alone really conveys a good way to see all that.
This is the site I use,… good old http://www.cplusplus.com/doc/tutorial/