[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
TurboCpp2006HelloWorld
Change it to the code below:
Press F9 to start your Hello World program.
There are two notes:
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
TurboCpp2006HelloWorld
(C++) (Turbo C++ 2006) Hello World
To create a Hello World program in Turbo C++ 2006 do the following:- Go to 'File | Close All' to close the default project
- Do 'File | New | Other' to go to the 'New Item' menu
- In the 'New Item' menu, select the 'Item Category' 'C++ Builder Projects'. In the right part, you can now double-click on 'Console Application'. Do so to start the 'New Console Application' dialog.
- In the 'New Console Application' dialog, set 'Source Type' to 'C++', uncheck 'Use VCL', uncheck 'Multithreaded', check 'Console Application'. Then press OK to be taken to the Code Editor.
//---------------------------------------------------------------------------//---------------------------------------------------------------------------
- pragma hdrstop
int main(int argc, char* argv[]) { return 0; } //---------------------------------------------------------------------------
- pragma argsused
Change it to the code below:
//---------------------------------------------------------------------------//---------------------------------------------------------------------------
- include <iostream> //Added
- pragma hdrstop
int main(int argc, char* argv[]) { std::cout << "Hello World" << std::endl; //Added return 0; } //---------------------------------------------------------------------------
- pragma argsused
Press F9 to start your Hello World program.
There are two notes:
- The program will close automatically after displaying Hello World on the screen, as it will not wait for a key press
- The code above is not standard.
int main() { std::cout << "Hello World" << std::endl; std::cin.get(); //Wait for a key }
- include <iostream>
'Hello world' links
- C
- C++
- C++ Builder, console
- C++ Builder, VCL
- C++ Builder, CLX
- C++ BuilderX, console
- C++ BuilderX, Win32 API
- C#
- PHP
- Prolog
- Turbo C++
- Turbo C++ 2006
- Visual C++ 2005
- Visual Prolog
- Win32 API
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
