Working with String - File - While Loop
//NavidPlus.blogspot.com
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main( )
{
string text;
fstream inputStream;
inputStream.open("Website");
while (inputStream >> text)
{
cout << text << endl;
}
inputStream.close();
return 0;
}
// This Program will read all the input while the condition still true. |
Input File : Webiste
|
If you run this Program, you will find the problem !?
No comments:
Post a Comment