#include <iostream>
#include <string>
using namespace std;
int main()
{
char c1,c2,c3,c4;
cin >> c1 >> c2 >> c3 >> c4;
cout << c1 << c2 << c3 << c4 << endl;
cin.get(c1);
cin.get(c1).get(c2).get(c3).get(c4);
cout.put(c1).put(c2).put(c3).put(c4).put('\n');
cin.get(c1);
cout << "请输入一行内容:" << endl;
char buf[100] = {};
cin.getline(buf,100,'\n');
cout << buf << endl;
cout << "请输入一行内容" << endl;
string str;
cin >> str;
cout << str << endl;
}
unformat(程序有点问题)
最新推荐文章于 2024-04-02 20:12:25 发布