What Now!!?

This is a discussion on What Now!!? within the C++ Programming forums, part of the General Programming Boards category; ok i agree....

  1. #16
    Registered User
    Join Date
    Nov 2006
    Posts
    58
    ok i agree.

  2. #17
    Registered User
    Join Date
    Nov 2006
    Posts
    58
    Hi,

    I have just tried dev-cpp and the following works:

    1) open ide >> file >> new >> project >> c++ project >> console application.

    2) copy the following code into the ide:

    Code:
    #include <iostream>
    using std::cout;
    using std::endl;
    
    
    int main ()
    {
        cout << "hello mike!" << endl;
        cout << "press enter key to exit!!" << endl;
        system("PAUSE");
        return 0;
    }
    3) select compile/ run >> save text file as main2.cpp

    4) select compile/ run >> dos window should pop up

    5) forget what i said about the c project - sorry

  3. #18
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    To use system, #include <cstdlib> and reference it as std::system.

    Better yet, get an IDE that doesn't require stupid hacks to keep the console open.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #19
    Registered User
    Join Date
    Nov 2007
    Posts
    40
    I agree with corned, you should definitely get a better IDE. (I use codeblocks.)

    Try adding this one, I think it's included in <iostream>:

    Code:
    #include <iostream>
    using std::cout;
    using std::endl;
    
    
    int main ()
    {
        cout << "hello mike!" << endl;
        cout << "press enter key to exit!!" << endl;
        cin.get();
        cin.ignore();
        return 0;
    }

  5. #20
    human jerkey dead_captain's Avatar
    Join Date
    Jan 2008
    Location
    509
    Posts
    37
    HEY HEY! "L" did the trick, I guess I was too tierd to notice, or I thought it was 1 for whatever reason. This is kick @ss! thanks!!!

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

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