用cout能输出字符串吗。。?能的话我的以下程序为什么错呢。。?谢谢

[复制链接]
查看11 | 回复1 | 2011-5-10 13:42:31 | 显示全部楼层 |阅读模式
#include
using namespace std;
class MATE
{
public:
        MATE(string n,int a,char s):name(n),age(a),sex(s){}
       

MATE()
        {
        cout>name;
cin>>age;
cin>>sex;

}
void MATE::out()
{
        coutusing namespace std;class MATE{public:MATE(string n,int a,string s)
{
name = n; age = a; sex = s;
cout
回复

使用道具 举报

千问 | 2011-5-10 13:42:31 | 显示全部楼层
加上#include
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行