cout problem with windows API

This is a discussion on cout problem with windows API within the Windows Programming forums, part of the Platform Specific Boards category; hi im writing a windows api using mingw with -mwindows and i use eclipse as my editor/compiler/debugger. in my code, ...

  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,211
    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, 10: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, 07:37 AM
  4. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 12:14 PM
  5. MFC or Windows API
    By aresashura in forum Windows Programming
    Replies: 7
    Last Post: 12-01-2001, 10:21 PM

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