12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NOTE<br />

Gett<strong>in</strong>g Your Feet Wet<br />

In order to display Hello World! on the screen, we need to make use of a <strong>C++</strong> class called<br />

iostream, so a quick tutorial on that class is needed. (You don’t know about classes yet, but<br />

don’t worry about that right now.) The iostream class uses streams to perform basic <strong>in</strong>put and<br />

output, such as pr<strong>in</strong>t<strong>in</strong>g text on the screen or gett<strong>in</strong>g <strong>in</strong>put from the user. The cout stream<br />

is used to send data to the standard output stream. In a console application, the standard<br />

output stream means the console, or the screen. The c<strong>in</strong> stream is used to get data from the<br />

console, such as user <strong>in</strong>put. iostream implements two special operators to place <strong>in</strong>formation<br />

on a stream or to extract <strong>in</strong>formation from a stream. The <strong>in</strong>sertion operator () is used to extract data from an<br />

<strong>in</strong>put stream. To output <strong>in</strong>formation to the console, you would use<br />

cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!