answersLogoWhite

0

What is stream in C plus plus?

Updated: 8/11/2023
User Avatar

Wiki User

9y ago

Best Answer

It's a bit difficult to show a class hierarchy using unformatted text alone, so I'll use the scope resolution operator to show the relationships instead.

Note: [] denotes multiple inheritance

ios_base

ios_base::ios

ios_base::ios::istream

ios_base::ios::ostream:

ios_base::ios::istream::ifstream

ios_base::ios::ostream::ofstream

ios_base::ios::[istream/ostream]::iostream

ios_base::ios::[istream/ostream]::iostream::fstream

ios_base::ios::[istream/ostream]::iostream::stdiostream

ios_base::ios::[istream/ostream]::iostream::stringstream

streambuf

streambuf::filebuf

streambuf::stdiobuf

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

A stream is a stream of data. C++ supports input and output streams. Data can be extracted from an input stream and inserted into an output stream. Streams can be specialised for specific types of data, such as file streams (typically binary or character data) and string streams (character data).

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Streams has nothing to do with C++. They are a platform / library issue. You can have streams in any language.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is stream in C plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are filestream classes in c plus plus?

The file stream classes (ifstream and ofstream) are derivatives of the I/O stream classes (istream and ostream) that are specific to file input and output.


Which stream functions in c plus plus control the formatting of input and output values of a class?

None of them. To control the formatting of your classes, you must overload the stream insertion and extraction operators.


What is stream pointer in c?

C does not have stream pointers.


What is the name of the 'endl' operator in c plus plus and its purpose?

endl is not an operator. Is is a stream manipulator. It inserts and end-of-line into the stream. cout << "This is a test" << endl << "This is also a test" << endl; Gives you ... This is a test This is also a test


C plus plus reading and writing a file?

Use an input file stream (ifstream) to read from a file and an output file stream (ofstream) to write to a file. Both can be found in the <fstream> standard library header.


What is stream operator in c plus plus?

There are two stream operators: << (insert or put) and >> (extract or get). Output streams implement the insertion operator, input streams implement the extraction operator and input/output streams implement both operators.


Why you use constreamh in c plus plus?

There is no such header in C++. You must consult the documentation provided with the file. It is most likely related to console input/output, perhaps providing enhancements to the standard I/O stream implementation.


How do you read data separated by commas into arrays in c plus plus?

You need to put if statement to check presence of comma in the stream. Most likely you have to read data from stream character by character and compare each time with come:...char commaCheck = ',';...while (cin >> commaCheck)//you can replace cin with your stream{...if (commaCheck == ','){...}...}


What is the name of the 'setw' operator in c plus plus and its purpose?

setw() is not an operator, it is a parameterized stream manipulator. It sets the width of the field in the output stream which is about to be inserted. cout << setw(5) << 9 << endl; Gives you ....9 Where each dot represents one space.


How is file handling applied in c plus plus?

File handling is handled by input stream objects (ifstream) and output stream objects (ofstream), or bi-directional streams (fstream). These classes are derived from istream and ostream. See related links for more information on these classes.


What is b plus b plus b plus c plus c plus c plus c?

b+b+b+c+c+c+c =3b+4c


What is c plus c plus 2c plus c plus c equal?

c + c + 2c + c + c = 6c