将其中的非空格字符输出
1 #include <iostream> 2 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 4 using namespace std; 5 int main(int argc, char** argv) { 6 char c; 7 while(!cin.eof()) 8 if((c=cin.get())!=' ') 9 cout.put(c); 10 return 0; 11 }