Variables and Types

Hello, everyone! I am brand new to C++ (or any kind of programming related subject for that matter) and I created the "Hello World" program without any difficulty understanding but as I got into Variables and Types I'm having a hard time understanding exactly what I'm reading.

I understand a that a variable is a "portion of memory to store a value" but after that...valid identifiers, fundamental data types and their sizes just kind of lose me. If anyone has a way of trying to explain it differently or helping me understand the significance of it that would be perfect.

I'm interested in really understanding the language so I'm trying not to bump over things, but I'm definitely open to any kind of advice like "Just carry on with the tutorial and don't get hung up on things like that, you'll understand later" or something...hopefully I don't sound too silly.

Anyway, thanks for the help everyone I look forward to learning from you!

An identifier is a name. When talking about variables, valid identifiers are the names that you can use as a variable name. Example of valid names are my_house, p2, RandomNumber. Example of invalid names are 4ever, #foo, file-name.

Fundamental data types are types that are built into the language and you don't have to include any headers to use. Fundamental data types can often be handle very efficient by the computer hardware.

Other types uses fundamental data types as building blocks in order to create more complex types. You might have seen some class types (which are not fundamental types) like std::string and std::fstream. std::cout a variable of type std::istream.
Topic archived. No new replies allowed.