I don't know how to use Borland C++ 6 Pro

This is a discussion on I don't know how to use Borland C++ 6 Pro within the C++ Programming forums, part of the General Programming Boards category; I don't know how to use Borland C++ 6 Pro. I can't even compile a basic cout. It compiles without ...

  1. #1
    Ipsec Espah
    Guest

    I don't know how to use Borland C++ 6 Pro

    I don't know how to use Borland C++ 6 Pro. I can't even compile a basic cout. It compiles without any errors but the Form will come up and nothings on it. Neither the 900 page manual or my 1100 page C++ Primer Plus book is any help. What in the HELL do i do to put this damn thing in console mode? I'm not even sure if thats the problem because all of the examples that were included with the installation do the same exact damn thing.

  2. #2
    Open to suggestions Brighteyes's Avatar
    Join Date
    Mar 2003
    Posts
    204
    >What in the HELL do i do to put this damn thing in console mode?
    Just follow these steps:

    1) Go to File, then select Close all to clear out the default junk.
    2) Go to File, New, Other..., and select Console Wizard.
    3) Accept the default settings and click OK.
    4) This should create a new project for you with an empty program template called Unit1.cpp. Just delete what's there or remove the file completely and make a new one.
    5) Punch in your code, then go to Run and click on Run, or just hit F9 on your keyboard.

    If the console window disappears before you can see anything then you'll need to do what's suggested here. My preference is to place a cin.get() just before the end of main:
    Code:
    #include <iostream>
    
    int main()
    {
        std::cout<<"A message."<<std::endl;
    
        std::cin.get(); // Save the window!
    }
    p.s. What the alphabet would look like without q and r.

  3. #3
    Ipsec Espah
    Guest
    Ok i did that and copied and pasted your code in, but in the bottom window it shows errors when i try to run it.

    [Linker Error] Unresolved external '__InitVCL' referenced from D:\PROGRAM FIELS\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl
    [Linker Error] Unresolved external '__ExitVCL' referenced from D:\PROGRAM FIELS\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl

  4. #4
    Registered User
    Join Date
    Apr 2003
    Posts
    6
    Dont delete the original text in the console wizard but instead just add the extra text.
    Cout doesnt work in windows, just DOS.
    However you didnt get the program to program DOS, you got it to program windows.
    To output text the regular way you have several ways to do it
    Method 1:
    Drop a Label to your form and type this into your source code.

    __fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
    {
    Label1->Caption="Hello world";//you add this line inside a block
    }
    Method 2
    Drop a memo to your form and type this to your souce code.
    Memo1->Lines->Add("Hello World");

  5. #5
    Ipsec Espah
    Guest

    Thumbs up

    Thank you! I didn't know you were supposed to add the code inside the default code it puts up... I got it working in Windows and DOS now. Thanks again

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Differing versions of XP Pro?
    By Davros in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-02-2002, 12:19 PM
  2. Home vs. Pro
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 01-08-2002, 06:37 AM
  3. Visual c++ / Visual Fox Pro
    By unanimous in forum C++ Programming
    Replies: 0
    Last Post: 12-25-2001, 01:32 PM

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