Board index » cppbuilder » how do get simple C++ programs to work in C++ builder 6?

how do get simple C++ programs to work in C++ builder 6?


2004-02-23 02:28:45 AM
cppbuilder12
how can you get a simple C++ program like this to work in C++ builder 6?
#include <iostream>
using namespace std;
int main();
{
cout << "hello world"\n";
return 0;
}
 
 

Re:how do get simple C++ programs to work in C++ builder 6?

Start by correcting the errors.
Remove the semicolon in
int main();
and the quote following the d in
cout << "hello world"\n";
If building in the IDE select File|New|Other and double click Console Wizard
Check C++ and Console Application
Uncheck Use VCL and Use CLX
If building from the command line it is done like this:
----------------------------
C:\Documents and Settings\Administrator\My Documents\Lookat\Temp
Quote
type temp19.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "hello world\n";
return 0;
}
C:\Documents and Settings\Administrator\My Documents\Lookat\Temp
Quote
bcc32 -WC temp19
Borland C++ 5.6.5 for Win32 Copyright (c) 1993, 2002 Borland
temp19.cpp:
Turbo Incremental Link 5.64 Copyright (c) 1997-2002 Borland
C:\Documents and Settings\Administrator\My Documents\Lookat\Temp
Quote
temp19
hello world
C:\Documents and Settings\Administrator\My Documents\Lookat\Temp
Quote

----------------------------
. Ed
Quote
Ricky Sovanasy wrote in message
news:4038f4dd$ XXXX@XXXXX.COM ...

how can you get a simple C++ program like this to work
in C++ builder 6?

#include <iostream>

using namespace std;

int main();

{
cout << "hello world"\n";
return 0;
}
 

Re:how do get simple C++ programs to work in C++ builder 6?

"Ricky Sovanasy" < XXXX@XXXXX.COM >wrote in message
Quote

how can you get a simple C++ program like this to work in C++ builder 6?

#include <iostream>

using namespace std;

int main();

{
cout << "hello world"\n";
return 0;
}
Create a new console application.
To stop the console window application dissappearing, put a breakpoint in
the editor's gutter, or use getch() (in conio.h), or perhaps a 'cin'
statement. If you use the breakpoint method, use F9 to continue execution,
and program termination.
HTH
Simon.
 

{smallsort}