-
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
Code:
on page Unit1.cpp
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#pragma package (smart_int)
#pragma resource ".dfm"
Tform1*form1;
_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
_published
private:
public:
_fastcall tforms(tcomponent* owner);
);
my add in code
#include<iostream>
int main()
{
cout<<"hello";
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
-
-
Code:
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.
-
> what makes the code not recognize the "cout"?
I see no
using namespace std;
Or perhaps try
std::cout << "hello world";