Borland Troubles with Following Your Tutorial

This is a discussion on Borland Troubles with Following Your Tutorial within the C++ Programming forums, part of the General Programming Boards category; Well I'm a brand spanking n00bie with C++; I unwrapped the Borland C++ Builder for Windows 95 & Windows NT ...

  1. #1
    Unregistered
    Guest

    Borland Troubles with Following Your Tutorial

    Well I'm a brand spanking n00bie with C++; I unwrapped the Borland C++ Builder for Windows 95 & Windows NT yesterday, and started toying around with it today.

    Everything in the package looked downright Greek to me other than the Help Tutorial, so I looked up this site to get a simpler explanation. And of ALL the places to get stuck, I get stuck on the first simple cut/paste code for the "HELLO world!" message.

    I tried copy/pasting the code along with other lines already shown and got some errors. I tried copy/pasting the code by itself and got some errors. I even followed Borland's included tutorial of making a fish report... I mean, a FISH REPORT! ...and obviously that didn't help me either.

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    178
    What exactly are the errors you are getting???
    Oi Oi Oi!!!!

  3. #3
    Unregistered
    Guest
    When I put in the bare-bones code:
    #include <iostream.h>
    int main()
    {
    cout<<"HEY, you, I'm alive! Oh, and Hello World!";
    return 0;
    }
    [Linker Error] Undefined symbol_Form1 referenced from "so-and-so-save.obj."
    [Linker Error] Undefined symbol TForm1:: referenced from "so-and-so-save.obj."


    I also tried pasting it under the code that's already included when a new application is made, and it ran with no errors:
    //---------------------------------------------------------------------------
    #include <vcl\vcl.h>
    #pragma hdrstop

    #include "Unit1.h"
    //---------------------------------------------------------------------------
    #pragma resource "*.dfm"
    TForm1 *Form1;
    //---------------------------------------------------------------------------
    __fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
    {
    }
    //---------------------------------------------------------------------------
    #include <iostream.h>
    int main()
    {
    cout<<"HEY, you, I'm alive! Oh, and Hello World!";
    return 0;
    }
    But now all that comes up is a blank form. I'm guessing I have to make something out of the form to show what's happening, but I don't know how.

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    317
    Try creating a new project. Then enter the hello world program in that new project:
    Code:
    #include<iostream>
    
    using namespace std;
    
    int main(){
           cout<<"Hello World!"<<endl;
           cin.get();
           return(0);
    }
    If you recieve an error on unidentified external cout(or something like that) replace
    Code:
    #include<iostream>
    
    using namespace std;
    with
    Code:
    #include<iostream.h>
    Post any errors you may get from this.

  5. #5
    Registered User Mario's Avatar
    Join Date
    May 2002
    Posts
    317
    When creating a new project for your hello world application, create a console project.

    You are creating a windows project when that example is for a console one.
    Regards,
    Mario Figueiredo
    Using Borland C++ Builder 5

    Read the Tao of Programming
    This advise was brought to you by the Comitee for a Service Packless World

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. My new website
    By joeprogrammer in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 03-17-2006, 06:38 PM
  2. Cprog tutorial: Design Patterns
    By maes in forum C++ Programming
    Replies: 7
    Last Post: 10-11-2004, 01:41 AM
  3. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 08:40 PM
  4. Problem with tutorial (Vector class)
    By OdyTHeBear in forum C++ Programming
    Replies: 4
    Last Post: 12-18-2002, 01:49 PM
  5. My DirectInput tutorial....
    By jdinger in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 06-18-2002, 11:32 PM

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