小编SP_*_*SP_的帖子

3
推荐指数
1
解决办法
4715
查看次数

不识别c ++中的字符串数据类型

我正在学习Visual C++ 2008中的C++编程,快速版.我的程序没有识别std::string数据类型.我已经包括了<string>图书馆.

#include "stdafx.h"
#include <iostream>
#include "TestClass.h"
#include <string>

using namespace std;

class Rectangle {
private:
    int width;
    int height;
    double area;
    string name;

public:
    Rectangle()
    {
        width = 0;
        height = 0;
    }

    int getWidth()
    {
        return width;
    }

    int getHeight()
    {
        return height;
    }

    void setWidth(int width)
    {
        this->width = width;
    }

    void setHeight(int height)
    {
        this->height= height;
    }

    void setArea( )
    {
        area = width * height;
    }

    double getArea( ) …
Run Code Online (Sandbox Code Playgroud)

c++ string header visual-studio-2008

1
推荐指数
1
解决办法
120
查看次数

标签 统计

c++ ×1

header ×1

javascript ×1

php ×1

refresh ×1

reload ×1

string ×1

visual-studio-2008 ×1