Program _console Interaction in C++

Here I would like to share the concept of Program & console interaction in c++.

We have used cin & cout in cpp program, we can use scanf & printf too in cpp but to achieve oos concept, we have been using cin & cout.

So, What is cin & cout? They are stream objects.

Now what is stream?

A stream is a flow which take u from one place to another.

Like you have to enter some text thru keyboard(one place) it should be stored somewhere(other place) should be shown in screen(other place).

Like 8 decades back, we had a ship in London which used to sail to NewYork thru stream of water(sea, river).

Coming back to cin & cout.

cin is an instance of Istream_with_assign class which inherits istream & ios class.

cout is an instance of ostream_with_assign class which inherits ostream & ios class.

Advertisement

0 Responses to “Program _console Interaction in C++”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




RSS RSS

Twitter

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Categories

calender

October 2010
M T W T F S S
« Sep   Nov »
 123
45678910
11121314151617
18192021222324
25262728293031

Follow

Get every new post delivered to your Inbox.