有个C++程序连接时有错误,但编译时没有错!高手进
答案:2 悬赏:50
解决时间 2021-03-12 12:00
- 提问者网友:我喜歡係
- 2021-03-11 21:39
a<<,*p3;
#include<#include<<"<"
using namespace std;cout<,the order is;<:"iostream>string><
if(a>x=y;<,string &);<
cout<
if(b><; " ",c);endl;
z=x;"<:"c) swap(a;
if(a>
gets(p3);c) swap(b;
gets(p1);endl;
string a="b) swap(a,
c="<,b),string &y)
{string z; " "<
char *p1;;
}
void swap(string &x;
p1=&a[0],
b="
return 0;<;input there line;endl; ",c);p3=&c[0];"
cout<,*p2;c;b<
int main()
{void swap(string &;<
cout<
gets(p2);p2=&b[0]
最佳答案
- 二级知识专家网友:情战辞言
- 2021-03-11 21:58
问题出在 swap函数上吧?你既然包含了string头文件,建议使用 strcpy()函数。
全部回答
- 1楼网友:转身→时光静好
- 2021-03-11 22:39
b;
people(people& p), char *id;"sex;
cin>
char* id.output();endl;
public;员工编号;
strcpy(id;123456789123456","string><,d)
{
number=n.output():
birthday() {year =0;
strcpy(id, char s);<
}
void people:",m;endl; month = 0;<"
p1;<>.output();<,8:",int d)
{ year=y;
b;
}
people;<,8;:,d):
people() {number =0;
sex=p;<
public;
people p3(10;dayyear<<
我要举报
大家都在看
推荐资讯