Thread: borland builer 6.0

  1. #1
    Registered User
    Join Date
    Jun 2006

    borland builer 6.0

    hi, i've recen tly down loaded the new builer 6.0
    i have only use turbo C++ before, i am have problems running
    simple code. when i compile the error i get is "undefined 'cout'"

    code already written when i open new form
    on page Unit1.cpp

    on page Unit1.cpp
    #include <vcl.h>
    #pragma hdrstop
    #include "Unit1.h"
    #pragma package (smart_int)
    #pragma resource ".dfm"
    _fastcall tform1::tfrom1(Tcomponent*owner)
    : Tform(owner)
     on page Unit.h
    #ifndef Unit1H
    #define UnitH
    #include <Classes.hpp>
    #include <countrols.hpp>
    #include <stdctrls.hpp>
    #include <forms.hpp>
    class tfroms : public tfroms
            _fastcall tforms(tcomponent* owner);
    my add in  code
    int main()
       retun 0;
    ive tried to add my code in both Unit1.cpp and Unit.h
    neither has worked, ive tried the help option, but alot of the code that i start with ive never seen before, so i dont really know what to look for. please help me get started
    what makes the code not recognize the "cout"?
    thank you
    Last edited by shooric81; 06-07-2006 at 11:45 PM.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User Kurisu's Avatar
    Join Date
    Feb 2006
    std::cout << "hello";
    or specify a namespace.

    By the way create a console app. I've never used builder, but it seems like that pre-existing code is for a windows app using a drag'n'drop interface.
    Last edited by Kurisu; 06-08-2006 at 12:51 AM.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    > what makes the code not recognize the "cout"?
    I see no
    using namespace std;

    Or perhaps try
    std::cout << "hello world";
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling x64 code in VC++ 6.0?
    By cpjust in forum Windows Programming
    Replies: 7
    Last Post: 07-29-2008, 09:36 AM
  2. Visual C++ 6.0 Pro vs Visual C++ 6.0 Enterprise
    By Joelito in forum Tech Board
    Replies: 5
    Last Post: 01-23-2007, 07:00 PM
  3. Visual Studio 6.0 Help
    By L_I_Programmer in forum C++ Programming
    Replies: 1
    Last Post: 03-24-2003, 10:35 PM
  4. ListView Version 6.0 and ImageLists
    By blundstrom in forum Windows Programming
    Replies: 0
    Last Post: 07-26-2002, 09:35 AM
  5. interrupt handler functions in Visual C++ 6.0
    By scromer in forum A Brief History of
    Replies: 1
    Last Post: 01-07-2002, 07:06 PM