How to print something on screen [closed]
The question is how to print something on screen without using variables provided user inputs data but not stored in variable?
I think you were supposed to use the stl copy algorithm:
#include <iterator>
using namespace std;
copy(istream_iterator<string>(cin), istream_iterator<string>(), ostream_iterator<string>(cout, "\n"));
The relevant stl doc is http://www.sgi.com/tech/stl/copy.html
I think you're looking for this.
using namespace std;
cout<<"Enter something: ";
cin>>inputvar;
Start with
putchar(getchar());
then work from there.
精彩评论