HELP! Don't Know NOTHING!!

This is a discussion on HELP! Don't Know NOTHING!! within the C++ Programming forums, part of the General Programming Boards category; I need to code the following c++ program by Monday. Code a program that will print "Hello World" on the ...

  1. #1
    Registered User carrja99's Avatar
    Join Date
    Oct 2002
    Posts
    56

    Exclamation HELP! Don't Know NOTHING!!

    I need to code the following c++ program by Monday.

    Code a program that will print "Hello World" on the first line of the screen, then on the next line print "My name is [name]". Then the user can press any key to exit.

    I've been working on this for the past 9 hours, but I still can't figure it out!! How do I do this?

    Sorry, but I am new at programming, but I plan on majoring in it.
    I am Error. When all else fails, use fire.

    My Current Screenshot

  2. #2
    Registered User abrege's Avatar
    Join Date
    Nov 2002
    Posts
    369
    Well your problem is very easy!

    extern "C" system(const char *);
    void main()
    {
    system("echo Hello World!");
    system("echo My name is [name]");
    system("pause");
    }
    I am against the teaching of evolution in schools. I am also against widespread
    literacy and the refrigeration of food.

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>I've been working on this for the past 9 hours,
    Then you must have some code to show. Why not post it and someone will help you.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>void main()
    come away from the fire people...
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,659
    ...come away from the fire people...
    ...must...hold...back....



    ITSA
    Socket Library!

  6. #6
    In The Light
    Join Date
    Oct 2001
    Posts
    598
    howdy,
    the classic "hello world" code is available in about a billion places.

    M.R.
    I don't like you very much. Please post a lot less.
    Cheez
    *and then*
    No, I know you were joking. My point still stands.

  7. #7
    Registered User carrja99's Avatar
    Join Date
    Oct 2002
    Posts
    56
    heheheh... I just had to do that. I keep seeing so many posts like that on his board... I just HAD to mock them!
    I am Error. When all else fails, use fire.

    My Current Screenshot

  8. #8
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>I just HAD to mock them
    OK, funs over now though
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21