Thread: excuse me i need SERIOUS help!!!

  1. #1

    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.....

    -Desperatly I. Wantingtolearn

  2. #2
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    You can start by reading the tuts on this site.
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.

    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

  3. #3
    Registered User
    Join Date
    Jan 2002
    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

  4. #4
    Registered User biosx's Avatar
    Join Date
    Aug 2001
    The first step is to become a member of this forum.

    #include <iostream.h>
    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.

    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.

  5. #5
    _B-L-U-E_ Betazep's Avatar
    Join Date
    Aug 2001
    #include <iostream.h>

    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


    } 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)

    #include <iostream.h>
    int main()
    cout << "this is a properly terminated line";
    return 0;
    } // end of main

    // denotes a comment. Comments are user readable and have information about you code. // only comments out the remainder of the line that you are on...

    // This is a correct comment

    // This is an
    incorrect comment.

    Good luck
    Last edited by Betazep; 03-20-2002 at 12:41 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. i need serious HELP!!!
    By Nikisha in forum C++ Programming
    Replies: 4
    Last Post: 03-16-2003, 07:35 AM
  2. Excuses
    By The Dog in forum A Brief History of
    Replies: 8
    Last Post: 07-23-2002, 05:48 AM
  3. Need serious help with a circle program
    By CheeseMonkey in forum C Programming
    Replies: 2
    Last Post: 04-20-2002, 12:48 PM