English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I know how to use it but I what to what it means. and what iostream mean I know its a library but does it mean to display things to the screen.

2006-10-30 14:18:43 · 4 answers · asked by Best Helper 4 in Computers & Internet Programming & Design

sorry about the grammer above here it is again.

I know how to use it but, what it means. what iostream mean also. I know its a library but does it mean to display things to the screen.

2006-10-30 14:20:10 · update #1

4 answers

Hi there.

Basically taking it part by part: #include is a referece you are doing to a collection of libraries within the c++ and c# programming language usually. In the case of namespace that is a keyword you are sending to the compiler so that way whatever you refer to (in this case std) becomes available and acceptable by the compiler wherever you want to use it. A namespace itself is like a big container with a collection of classes within. However, notice that instead of "#include namespace std;" use "using namespace std;" which is usually placed on top of your program code.

The "iostream" or "iostream.h" depending on the language brand you use (MS, Borland, etc) is a header file that defines input and output activities that are usually coded on console programming (classic black screen application that runs on a prompter. Let's say, when you're using cin >> variableX; or cout << variableY; or cout << "StringA"; you're making the compiler to say to the console application something like "Hey I want you to take this data for me" (in the case of cin) or "Hey print this out into your console for me" (in the case of cout).

There are other libraries you could play with such as "fstream" (used for file handling), "cctype" (for specific character handling) "string" (specific string activity).

Hope it helps.

2006-10-30 15:02:44 · answer #1 · answered by Izzy 2 · 1 0

#include namespace std is the namespace you would use to add the header to your program. This is used is to localize the names so that you avoid the names running into each other. Using std puts the namespace in a global area.

iostream is for general input/output, if you are programing in C++ for example that library is what allows you to use cin and cout.

2006-10-30 22:51:24 · answer #2 · answered by Alex F 1 · 1 0

#include (some name space):- This ll conatin all the predefined classes. So if u are using those classes, ur program to execute, u need those classes also. So # is called as Pre-Processor Directive. It says that it is a command /instruction given to the compiler to load all the classes that are defined in the namespace.
For this purpose only u import.

#include
Is used to perform input/output operations.
So for doing all these operation(s) u need the classes that are present in that namespace.

I think u go it now.

2006-10-31 12:56:28 · answer #3 · answered by Sudha P 2 · 0 0

Please check more information at
http://www.cplusplus.com/ref/iostream/

2006-10-30 22:21:30 · answer #4 · answered by jetkidz 3 · 0 0

fedest.com, questions and answers