newbie Question

This is a discussion on newbie Question within the C++ Programming forums, part of the General Programming Boards category; How can I print the text like its typed? Its kinda hard to explain.. (because of my bad english skills) ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    25

    Question newbie Question

    How can I print the text like its typed?

    Its kinda hard to explain.. (because of my bad english skills)


    A
    AR
    ARN
    ARNIS

    The letter 'R' will come like an 0.3 sec after the 'A' ..


    one way to do it would have been:
    Code:
    cout<<"a";
    Sleep(100);
    cout<<"r";
    Sleep(100);
    cout<<"n";
    Sleep(100);
    cout<<"i";
    Sleep(100);
    cout<<"s";
    Sleep(100);


    But that sucks. any easier way to do this?
    please help me

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Code:
    char *array = "arnis";
    for ( int i = 0; array[i] != '\0'; i++ ) {
      cout<< array[i] <<flush;
      Sleep ( 100 );
    }
    -Prelude
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    25

    thanks

    Thanks alot m8

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stupid Newbie question
    By TimL in forum C++ Programming
    Replies: 4
    Last Post: 07-22-2008, 05:43 AM
  2. C prog newbie question
    By Draginzuzu in forum C Programming
    Replies: 1
    Last Post: 02-03-2003, 06:45 PM
  3. a stupid question from a newbie
    By newcomer in forum C++ Programming
    Replies: 4
    Last Post: 01-11-2003, 04:38 PM
  4. confusion with integers (newbie question)
    By imortal in forum C Programming
    Replies: 7
    Last Post: 12-06-2002, 04:09 PM
  5. newbie class templates question
    By daysleeper in forum C++ Programming
    Replies: 2
    Last Post: 09-18-2001, 10:50 AM

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