running code in borland

This is a discussion on running code in borland within the Tech Board forums, part of the Community Boards category; ok, I've got my code, and it compiles with no errors, and the code file test1.cpp is part of the ...

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    242

    running code in borland

    ok, I've got my code, and it compiles with no errors, and the code file test1.cpp is part of the project Learn.exe.

    When I click run (presumably the green button on the second toolbar that looks kind of like > ), a small window flashes up sufficiently quickly that I can't even read it.

    My test1.cpp file just has the command cout << "Hi!\n";

    So, what I'm looking for is how to get a window where I can watch the output (and for more complex programs enter user input).

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,824
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    242
    That doesn't work. I added a cin line to get the code to stop.

    This code compiles, but when I click run, I get a box (unlike the black screen I know from MS Visual) that seems to have potential error messages on it but appears for a very short time (not a flash, but too short for me to read), and I get no option to input anything:

    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
         char Conf;
    
         cout << "Press any key to exit ...";
         cin >> Conf;
    
         return 0;
    }

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,824
    Run it from a command prompt, then you'll be able to see what (if anything) is happening.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    242
    it will run from MS Visual C++ express. Command prompt not immediately transparent from borland interface.

    so, i guess no substantive help on this ...

  6. #6
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,273
    Quote Originally Posted by Aisthesis View Post
    it will run from MS Visual C++ express. Command prompt not immediately transparent from borland interface.

    so, i guess no substantive help on this ...
    Uh... Go to Start->Run, type "cmd", cd to the directory where you executable is, and execute it?
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling C Code with Borland
    By blackcell in forum C Programming
    Replies: 16
    Last Post: 03-18-2008, 05:15 PM
  2. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  3. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Linux Programming
    Replies: 0
    Last Post: 10-14-2002, 02:30 PM
  4. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM

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