Help

Started learning c++ yesterday using the tutorials on this site.firstly do you think the tutorials on here are suitable for complete beginners? Finding it hard to get my head round some things. Also I'm stuck on fundemental data types, can anyone explain it a little simpler as I'm not sure what any of it means.

Thanks
That's hard to answer because C++ is not a trivial language for complete beginners. It's a non-trivial language for most experienced programmers.

Going down to the basics. All data on a computer consists of bits. A bit can be 0 or 1. Technically, all any program does is flip these bits on (1) and off (0).

So how the heck can you make a program do anything? Well, you can start by giving your bits some meaning or interpretation. For example, I may have a set of 8 bits (or 1 byte) which represents a alpha-numeric character (a-z, A-Z, 0-9). To keep track of this interpretation, I tell the C++ compiler that this byte is a char. A char is a fundamental datatype. To hold a number, I may use an int or long. For a real number, I may use float or double.

But always remember that there is really nothing fundamentally different between these datatypes in the sense that underneath, you are just referring to a series of bits of different length. But the advantage of specifying these datatypes is, the compiler can do some checks on your program so you don't do silly, nonsense operations.

Was this too easy an explanation? If so, what, specifically, don't you understand in the tutorial?
Last edited on
Thanks for the help, thats a little clearer. I dont understand what char or float would mean, are there any reasons why I would use one and not the other?

Thanks
you would use char and int in a lot of programing:
float or double handles fractional numbers
char means characters like A B C or 1 2 3 or special character like ! @ #.
and remember you will use them a lot in coming days
ok thanks a lot :)
One thing you may want to try is to learn C first.

C is a much smaller language than C++ (less intimidating), and your time will not be wasted because whatever you learn about C, you can apply to C++.

gl
simply take a c++ book which seems easy to u for the basics..with the time u will start enjoying c++..i also m a beginner like u and started directly with c++
Topic archived. No new replies allowed.