excuse me i need SERIOUS help!!!

This is a discussion on excuse me i need SERIOUS help!!! within the C++ Programming forums, part of the General Programming Boards category; it must just be me or something, i desperatly wanna learn, but i dont understand what what does to the ...

excuse me i need SERIOUS help!!!

it must just be me or something, i desperatly wanna learn, but i dont understand what what does to the computer to make it do certain things. like:

#include <iostream.h>

what is it and what does it do?

#int main()

what the wha.....???

{ <-------why is that there
cout<<(char)65; <-----why is the semi-colon at the end

ya see, i dont understand how this relates to do, i geuss, simple windows operations. i desperatly want to learn so bad. ive read the tutorial on this site, ive read threads. i dont understand.
if anybody can help me please.....

from most books ive seen, they never explain what '{' and what '#include' are right at the beginning, they usually say just remember to use it and it will become clear what they are for later on. The semicolon is just part of the syntax of the language, just as a period is part of the syntax of the written english language. Just keep going with the tutorials and im sure they will annswer many of your questions as you go along

Consider iostream.h to be a toolbox that holds a bunch of tools that you can use to output data to the screen and get input from the user. iostream.h is called a header file (ie the .h suffix) and you are taking the contents of the file (ie the tools and functions) and including it in your source code. You use the #include 'command' (really called a compiler directive) to tell the compiler to do this for you.

Code:

int main()
{
}

This is the heart of C/C++ programs. C/C++ (C more than C++) focuses on functions, which are like little black boxes that take data in (sometimes) and spit computed data out (sometimes). Kind of like a sausage maker. You put a bunch of raw meat in one end (input), inside the machine it compacts the meat (computes), and then outputs the desired sausage (spits out computed data). Kind of make sense? The main() function is the function that a program starts and ends from. The curly braces { } mark the beginning ({) and the end (}) of the function.

I would go on and on, but I think you either need to pick up a book or enroll in a class. Go to your library or barnes and noble and pick up: The C Programming Language by Kernighan and Ritchie. Good luck.

higher level program languages have functions, or better yet objects,(lines of code that do stuff--technical term) that do things for you. iostream deals with input and output using the cin and cout (respectively) objects. It deals with standard input (keyboard) and standard output (monitor)

cout << "send text to monitor";
cin >> receive_text_from_keyboard;

You have to include the library iostream in order to use cin and cout.

#int main() should be int main()

all C++ programs have a main. It is the part of the program that the os gives control to for execution and ends with a return to the os.

int main()
{

return 0;
}

is the standard way to start and end the program where:

int is the return type (usually 0, which essentially means all conditions normal) to the os.

main() is the function name and is required because the os looks for main() to run.

{ is the beginning of your program

return 0; is the actual return to the os at the end of the program

and

} denotes the end of your executable code in main

semicolons tell the compiler that the end of the line has reached. They are utilized in most cases at the end of code on a line within your function (which in this case is main)