String 类型与 char 类型比较

来源:互联网 发布:软件销售代理商 编辑:程序博客网 时间:2024/05/01 14:28
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"#include "string"using namespace std;int main(int argc, char* argv[]){char name[101];string ch;cout<<"Please input\n";cin>>ch;cout<<"Please input\n";cin>>name;cout<<ch<<endl<<name<<endl;system("pause");return 0;}

原创粉丝点击