Thread: printing to screen fast

  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267

    printing to screen fast

    Is there a way to display a character on the screen that's faster than cout or printf?

    i searched the board and found http://cboard.cprogramming.com/showt...ght=fast+print but that wasnt much help...

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    did you try putchar

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    220
    putchar() will do you fine.

    You can do some interesting things with ostreams probably, but only if you're uhmm, interested, and dedicated and such~
    OS: Windows XP Pro CE
    IDE: VS .NET 2002
    Preferred Language: C++.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > Is there a way to display a character on the screen that's faster than cout or printf
    Well if it's just static text, then puts() is a lot better than printf()

    But to be quicker still, you'd need to make your code non-portable and rely on something specific to your OS/Compiler.

  5. #5
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267
    what does dev-c++ have?

  6. #6
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    if you use c++ you some implementations of std::cout are faster than printf().

  7. #7
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267
    windows xp

  8. #8
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > what does dev-c++ have?
    http://faq.cprogramming.com/cgi-bin/...&id=1043284385
    Well that's not the real answer, but scroll down to the windows version of clrscr(), then go and read those and the related functions on MSDN for accessing the console directly.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Laptop LCD Screen
    By mkylman in forum Tech Board
    Replies: 8
    Last Post: 11-11-2006, 08:27 PM
  2. Converting from Screen to World Coordinates
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 05-11-2004, 12:51 PM
  3. Problem With search a file and printing to screen
    By sell682 in forum C++ Programming
    Replies: 4
    Last Post: 05-02-2004, 05:55 AM
  4. question about printing on screen and not overwriting text...
    By revelation437 in forum C Programming
    Replies: 2
    Last Post: 12-14-2002, 02:48 PM
  5. Printing out contents of a file to the screen
    By Simon in forum C Programming
    Replies: 18
    Last Post: 10-21-2002, 08:05 AM