Thread: cout problem with windows API

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    13

    cout problem with windows API

    hi

    im writing a windows api using mingw with -mwindows and i use eclipse as my editor/compiler/debugger.

    in my code, i use "cout" to print messages.

    when using eclipse, the messages print on the 'console' window, but only after the program has ended !!!

    when i run the program in a command window, there is no printing at all.

    please tell me, what makes the printouts come so late. i mean, why the printout only shows after the program ends and not during.
    and maybe which way is most convenient other than that to print debugging messages for myself to see during the program.

    thank you very much

    asta

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Try either appending std::endl to what you're printing, or manually flush cout with std::cout.flush().

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    13
    thanks alot

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. win32 api MDI windows
    By TheNewOne in forum Windows Programming
    Replies: 5
    Last Post: 03-20-2009, 09:11 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. a good windows API programming book
    By jpchand in forum Windows Programming
    Replies: 3
    Last Post: 10-10-2003, 06:37 AM
  4. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 11:14 AM
  5. MFC or Windows API
    By aresashura in forum Windows Programming
    Replies: 7
    Last Post: 12-01-2001, 10:21 PM