注册 登录
编程论坛 C++教室

string类

bibingyan 发布于 2008-04-01 21:50, 766 次点击
#include <iostream>
#include   <string>
using   namespace   std;
void   title(string   &str);
void   main()
{
    string dsf;
    cin>>dsf;
    title(dsf);
}
void   title(string   &str) //这个函数很好啊
{
        cout <<str <<endl;
}

为什么不能编译啊~~~~~
2 回复
#2
hgchenkv2008-04-01 22:18
很好,在VC++6.0下完全可以运行的
#3
newyj2008-04-01 22:20
void main()改为int main()
在主函数的最后一行加上return 0;
1