Код: Выделить всё
#include
namespace N {
class Fan {
private:
int speed;
double radius;
std::string color;
public:
//default no-arg constructor
Fan() {
setSpeed(1);
setRadius(1.53);
setColor("green");
}
//convenience constructor
Fan(double newRadius){
setRadius(newRadius);
}
//getters and setters go here
};
}
Код: Выделить всё
#include
#include "Fan.h"
using namespace std;
int main() {
Fan myFan; //error here
}
Я поместил их в один и тот же каталог и не знаю, что еще делать. Не совсем понимаю, что я здесь делаю не так.
Подробнее здесь: https://stackoverflow.com/questions/782 ... ndefined-c
Мобильная версия