Thread: newb to C, cant figure something out.

  1. #16
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    And why go through all that timer code? Why not just add at the bottom of main() before the return the following:
    Code:
        cin.get();
        return 0;
    }
    for C++
    Code:
        getchar();
        return 0;
    }
    for C

    A simple and direct screen pause.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  2. #17
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    869
    The "timer code" is a really bad idea because it thrashes the cpu in a busy wait by calling clock() over and over.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 3 dimensional figure volume
    By thekautz in forum C++ Programming
    Replies: 2
    Last Post: 01-20-2009, 05:22 PM
  2. Newb Question Character Counting
    By Wilder in forum C Programming
    Replies: 13
    Last Post: 06-22-2008, 11:37 PM
  3. trying to figure out someone's code for a plugin
    By paulpars in forum C++ Programming
    Replies: 4
    Last Post: 07-20-2006, 10:57 AM
  4. Newb C++ Programmer
    By Philandrew in forum C++ Programming
    Replies: 8
    Last Post: 10-19-2004, 08:44 PM
  5. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 12:01 PM