@Rahen ..
Let me explain a bit .. in C++ when you define any variable (a memory location), you have to tell what will you store in it .. its called that variable's 'Data Type' .. there are a number of data types in C++ (int for storing integers, char for storing a character, etc .. Yunus will be talking about this more later) .. So as I was saying .. each variable has a data type .. now you can declare a variable called 'mynumber' with the integer data type .. now you cannot use the variable name 'mynumber' again (to declare with some other data type). For example:
Code:
int a;
char a; // This is wrong
so the line:
'you can have multiple variables of the same type, you cannot have multiple variables with the same name'
means
you can declare more than one variable of the same data type (i.e. int a, b, c; declares three integer variables) but all the names have to be unique (as I tried to explain above).
The last bit is: you cannot have variables and functions with the same name
Its similar to the last one .. saying if you declare your own function (a piece of code that can be called again when you need it, again Yunus will come to this later) its name (or identifier in techi terms) should be unique .. for example
Code:
function a() {
// Some code
}
int a; // This is wrong
@Yunus ..
awesome stuff bro .. I just found da topic name confusing .. I came here to chk out C but found out it was C++ .. and I love the tutorials .. keep up da good work man
