Console Program Problem

This is a discussion on Console Program Problem within the C++ Programming forums, part of the General Programming Boards category; Okay, this is a wierd problem. I'm using VC++ on Windows 2000 and I am trying to program within console. ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    95

    Console Program Problem

    Okay, this is a wierd problem. I'm using VC++ on Windows 2000 and I am trying to program within console.

    Well, I have a big problem. When I try to compile a program, it gets all wierd. Whenever I compile, it always plays the code in different order. Like, if I get input, perform an operation on it, and I output text, it sometimes outputs text, gets input, and performs the operations. That was just an example. Does anyone know how to fix the problem?
    Think out of the box! Open Source rules!

    -Breach23

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    403

    sounds like your code.. not the compiler

    show some of your code, are you using any strange things in it like pointers to functions or goto statements?

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    95
    Well I don't have any code, because this is my net machine, and I don't like programming on it, cuz it isn't in my room, but I can tell you that I don't use any function pointers, or anything special in it. Just some i/o stuff, and some + or - things. Sorry for the lack of info.
    Think out of the box! Open Source rules!

    -Breach23

  4. #4
    Registered User
    Join Date
    Aug 2001
    Posts
    101
    Remember that ostream is buffered, so make sure you flush cout whenever you need to be sure that what you want to be outputted will be then and there. Also sometimes things get left in the input buffer which can explain some skippings of input operations. All these are quite specific, however, to the program so we do really need to see the code.
    - lmov

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with my program i cant figure out...
    By youareafever in forum C Programming
    Replies: 7
    Last Post: 11-02-2008, 12:56 AM
  2. Replies: 4
    Last Post: 05-25-2008, 01:31 AM
  3. Program problem
    By Birdhaus in forum C++ Programming
    Replies: 6
    Last Post: 11-21-2005, 10:37 PM
  4. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  5. simple frontend program problem
    By gandalf_bar in forum Linux Programming
    Replies: 16
    Last Post: 04-22-2004, 07:33 AM

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