Thread: strange problem with dev cpp

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    5

    strange problem with dev cpp

    hi whenever i compile my programs with devcpp and then run it i hav this problem where my program ends whenever i press enter after i type in stuff to fill my variable.

    for example:

    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
    int num;
    cout << "enter a number";
    cin >> num;
    cout << "the number you enterd is: " << num << endl;
    return 0;
    }
    this program ends right after i enter a value for num. it never gets to the cout statement at the end. this problem is not just specific to that program i just wrote. i have the same problem for every program in which i have to enter a value from the keyboard to fill a variable. could someone tell me how i can fix this problem?
    Last edited by henrychan22; 06-18-2006 at 02:20 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strange problem with classes in header files
    By samGwilliam in forum C++ Programming
    Replies: 2
    Last Post: 02-29-2008, 04:55 AM
  2. strange problem with operator overloading
    By misterowakka in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2008, 11:18 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  4. strange problem
    By kumarqt in forum C++ Programming
    Replies: 2
    Last Post: 06-19-2006, 02:02 AM
  5. Strange problem with fts_open call
    By jhopper in forum C Programming
    Replies: 0
    Last Post: 02-26-2002, 12:01 AM