Ok this is a very short tutorials on C++, even though i'm only into Arrays right now, I feel I can share my knowledge a tad.


Ok, We will learn how to use a "function" to output text to the monitor.
It can also output

intergers " int " ( -1, -2, -3, -- 1, 2, 3).

float "float" (decimal numbers. 1.0, 2.0, 3.0)

characters "char" ( a, b, c, d, e, f "you call this string too")
and
Doubles " double " These are Floats but with more space.

The stuff in the " " is how you word declare varibales.

Ok, so you want to know how to declare a variable.
varibale, basically a way of allocating memory.

#include <iostream.h> //this is a comment
// ^ don't worry about this yet.

int main() // don't worry about this yet, just studying output.
{ // this tells the complier where the program begins.
char a=A; // declaring the varibale and giveing it a value of A
// always end a statement with a sei-colon ";"

int b = 1; /*declaring the variable b and assigning 1 as it's variable*/

/* This is another form of comments, C style. */

float c = 3.5; // Declaring c and assigning the value of 3.5 to it.

double d=3.1452698 /* declaring the variable d and assigning the value of 3.1452698 to it*/

cout << a << endl; //outputs the value of a to the screen
cout << b << endl; //outputs the value of b to the screen
cout << c << endl; // output the value of c ot he screen
cout << d << endl; //outputs the value of d to the screen

return 0; // terminates the program
} //closing brace


Ok since that looks crowded i'll type the program out without comments. so it looks better

#include <iostream.h>
int main()
{
char a =A;
int b = 1;
float c = 3.5;
double d = 3.1452698;

cout << a << endl;
cout << b << endl;
cout << c << endl;
cout << d<< endl;

return 0;
}


You can have as many whitespaces as you want in C++ ( whitespaces = spaces )

Anyone can add on tot his tutorial. If you want me to add on, reply to this. thanks alot.