[ create a new paste ] login | about

Link: http://codepad.org/ciqW7Tn2    [ raw code | output | fork ]

outoftime - C++, pasted on Dec 20:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include <sstream>

using namespace std;

int main()
{
	string s;
	stringstream tmp;
	s = "1-th word, second word ect.";
	tmp << s;
	while (tmp >> s)
	{
		cout << s << endl;
	}
}


Output:
1
2
3
4
5
1-th
word,
second
word
ect.


Create a new paste based on this one


Comments: