melo-physique 2020-06-17 17:38 采纳率: 33.3%
浏览 128

【求助】为什么我的代码看起来好像没问题,但是运行不了??

【求助】为什么我的代码看起来好像没问题,但是运行不了

error C3646: “name”: 未知重写说明符

error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int

using namespace std;
#include "user.h"
#include "stdafx.h"
user::user(void)
{
}


user::~user(void)
{
}

#pragma once
class user
{
public:
    user(void);
    ~user(void);
    string name;
    string password;

};

  • 写回答

1条回答 默认 最新

  • threenewbee 2020-06-17 18:04
    关注

    string需要头文件

    #include <string>
    using namespace std;
    
    评论

报告相同问题?