Wednesday, March 15, 2017

C++ Part 24

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


NavidPlus https://NavidPlus.blogspot.com
NavidPlus@Blogger
Navid Plus is a Tech blog which is focusing on a Science material that I'll be learned every day through my College and job. Most likely blog's posts contain Programming, Security, Networking, Math, and photography. It is a FUN blog.
C Plus Plus @ NavidPlus
INTRO
Intro to C++ Part 1
Intro to C++ Part 2
Intro to C++ Part 3
Intro to C++ Part 4
Intro to C++ Part 5
Intro to C++ Part 6
Intro to C++ Part 7
Intro to C++ Part 8
_________________________________ C++ By NavidPlus.BlogSpot.Com

If you run this Program, you will find the problem !?

No comments:

Digital Design Part 3

4th→ assembler translates it to the machine language. 1.6 [20] <§1.6> Consider two diļ¬€erent implementations of the same instru...