|
-
November 22nd, 2005, 12:09 PM
#1
question about streams
Hello,
I have a function that I would like to either send it a ifstream or a string (maybe a string stream)?
So say I have this code:
string test = "hello this is a string to be parsed";
if(testint == 0)
{
ifstream in(fileName);
}
else
{
// put string in a stream here?
}
ParseData(generic stream?);
Can someone help me fill in the missing pieces to this code? basically I need to parse either a file or a string and I was hoping to use the same code to do either with maybe a generic stream?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|