473,387 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

IOstream reference - source code?


Hi,
any idea where one might find source code of operator >> that inputs
a character from iostream or fstream?

In example - online?

--
Rafał Maj
May 25 '06 #1
1 2569
"Raf256" <sp**@raf256.invalid> wrote in message
news:e5**********@inews.gazeta.pl...

Hi,
any idea where one might find source code of operator >> that inputs
a character from iostream or fstream?

In example - online?


What are you looking for?

std::ifstream MyStream("MyFile.ext");
if ( MyStream.is_open() )
{
char SomeChar;
while ( MyStream >> SomeChar )
{
std::cout << "Char is: " << SomeChar << std::endl;
}
}

std::ofstream MyStream("MyFile.ext");
if ( MyStream.is_open() )
{
char SomeChar = "X";
MyStream << SomeChar;
}

Is that what you want?
May 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Cat | last post by:
Hi I got stuck for C call C++ function w/ iostream. Here is my code In 1.h --------------------------------------------- #ifdef __cplusplus extern "C" { #endif int Export();
19
by: ernst.stiegler | last post by:
Hello, I just want to read a whole line from a console input. What I don't understand is that I always have to press ENTER twice in order to see the line I've entered. Here's my code : ...
2
by: Craig Nicol | last post by:
Hi everyone, I'm looking for some help migrating my code from Microsoft VC++ 6.0, which was not the most conformant compiler I have now discovered. I'm trying to move to .NET and I've made the...
2
by: Sigmund Skjelnes | last post by:
Hi! Trying to get a simple cpp program to compile, I'd got the linker complaining it could'nt find eiter cout nor endl or other object which belong to iostream. I'd had to use stdiolib to get the...
2
by: humble04 | last post by:
Hi, I am compiling a collection of C++ code. Most of them are using the new format #include <iostream>. I think all of them because I failed at finding out which header file uses the old format ...
6
by: radnoraj | last post by:
Hi, I am sucessfull in redirecting console output to a file. but in this case nothing is displayed on the console, cout output is written to file without display. how do write the output to...
3
by: Adam | last post by:
We have a web site that uses .vb for the web pages and .cs for a class module. We are getting the error in .NET 2.0 and VS 2005 beta 2. It does work with .NET 1.1. When trying to access a page...
0
by: Herman.Schultz | last post by:
Hi, I am trying to use C++ iostream in Darwin (apple opensource streaming server) source code. Here is what I did: 1. Add these in the file #include <iostream> using namespace std; 2. Add...
12
by: Bryan Parkoff | last post by:
I write my large project in C++ source code. My C++ source code contains approximate four thousand small functions. Most of them are inline. I define variables and functions in the global scope....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.