Thread: Need a bit of help

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    1

    Need a bit of help

    K guys, im new here and also new to programming, yesterday i went and did some research on C++ and it looked like a nice programming language to learn, so i made my first program, the problem is i want the program not to shut down when i press enter, so say if i made the program say: Hello World.
    When i press Enter after that i want it to say,: This is ur first program. And when i press Enter after that i want it to say,: Good job on making it.
    U see my problem, i would appreciate help... ty

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    Read Salem's link, then attempt somthing like:

    Code:
    #include <iostream>
    
    using std::cout;
    using std::endl;
    
    int main ( void )
    {
       cout << "TEXT";
       getchar(); // wait key press
       cout << "TEXT";
       getchar();
       cout << "TEXT";
    
       cin.get();
    
       return 0;
    }
    Read some beginners tutorials on this site to get started. Although they do move at a fast pace, so I would also advise a good beginners book. Check out the book recomendations on this site for more information. You will need a solid understanding of the basics before you can move on the more complacated things in the language.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bit manipulation
    By Neo1 in forum C++ Programming
    Replies: 8
    Last Post: 03-24-2008, 11:53 AM
  2. porting application from 32 bit to 64 bit error
    By gandalf_bar in forum Linux Programming
    Replies: 1
    Last Post: 09-14-2005, 09:20 AM
  3. Bit processing in C
    By eliomancini in forum C Programming
    Replies: 8
    Last Post: 06-07-2005, 10:54 AM
  4. Bitwise Operators - Setting and Retreiving a Bit
    By Spono in forum C Programming
    Replies: 2
    Last Post: 11-04-2003, 02:09 PM
  5. Bit Manipulation Questions
    By CPPNewbie in forum C++ Programming
    Replies: 7
    Last Post: 08-12-2003, 02:17 PM