Created
July 1, 2016 21:22
-
-
Save tanvir002700/abfe77faae1f1c8e3551d646606626b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<sstream> | |
#include<string> | |
using namespace std; | |
int main() | |
{ | |
string s1="This is example of String Stream"; | |
stringstream Stream1(s1); | |
string token; | |
while(Stream1>>token) | |
{ | |
cout<<token<<" "; | |
} | |
cout<<endl; | |
string s2="1 2 3 4 5 16 90 100 -199"; | |
stringstream Stream2(s2); | |
int t; | |
while(Stream2>>t) | |
{ | |
cout<<t<<" "; | |
} | |
cout<<endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment