Results 1 to 4 of 4
  1. #1
    thazachsta's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    USA
    Posts
    270
    Reputation
    9
    Thanks
    7
    My Mood
    Goofy

    [Help]Ugh...Thought I had it working!!!

    Hey guys,

    I'm having a problem...I just finished compiling a code through Dev-C++, and every time I run it, I never see the results. The program shuts of too quickly. Since I'm new to coding, is there a way I can have the program stay open longer than 1/1000 of a second? Here's the code if it'll help...By the way, I'm just learning so this is a code from a book.

    Code:
    /*
      Project 1-1
      
      This program converts feet to meters.
      
      Call this program FtoM.cpp
    */
    
    #include <iostream>
    using namespace std;
    
    int main()
    {
        double f; // holds the length in feet
        double m; // holds the length in meters
        
        cout << "Enter the length in feet: ";
        cin >> f; // read the number of feet
        
        m = f / 3.28; // convert to meters
        cout << f << " feet is " << m << " meters.";
        
        return 0;
    }
    Last edited by NextGen1; 10-06-2010 at 02:22 PM.
    Zach

  2. #2
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Added code tags for ya, let's use em when we can


     


     


     



    The Most complete application MPGH will ever offer - 68%




  3. #3
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love

    Several ways to.

    1.[php]cin.get(); //put before return 0[/php]
    2.[php]system("pause"); //put before return 0[/php]
    Last edited by Kallisti; 10-06-2010 at 03:14 PM.

    未来が見えなくて怖いから
    未来が見えてしまって悲しいから
    目を閉じて優しい思い出に浸ってしまう




  4. The Following 2 Users Say Thank You to Kallisti For This Useful Post:

    kaelan (10-06-2010),thazachsta (10-07-2010)

  5. #4
    thazachsta's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    USA
    Posts
    270
    Reputation
    9
    Thanks
    7
    My Mood
    Goofy
    Lol, I looked all over for the tags sorry. / Thanks Kallisti I'll try it!
    Zach

Similar Threads

  1. ::Call of Duty 5 Cracked Multiplayer help!!! Cant get the crack to work!! plz help
    By rosati in forum Suggestions, Requests & General Help
    Replies: 8
    Last Post: 01-27-2009, 10:37 PM
  2. Help I can't the link working!!!!!!!!!!!!
    By Rigby in forum Combat Arms Hacks & Cheats
    Replies: 3
    Last Post: 01-18-2009, 05:21 PM
  3. [HELP] My hotmail account isn't working
    By mrtanman in forum Suggestions, Requests & General Help
    Replies: 4
    Last Post: 10-15-2008, 12:57 AM
  4. Replies: 6
    Last Post: 11-26-2007, 07:46 PM
  5. [HELP] VB6 Hotkey for Zoom not working
    By SteeL in forum WarRock - International Hacks
    Replies: 13
    Last Post: 11-10-2007, 03:06 AM