여러 번 묻는 것을 알고 있지만이 문제를 이해할 수 없습니다. 이 내 헤더 파일 :악명 높은 'function'이이 범위에서 선언되지 않았습니다.
#include "Task.h"
const int TASK_SIZE = 3;
Task::Task() {
}
Task::~Task() {
}
Task::Task(double* _initialPoint, double* _finalPoint, int type) {
finalPosition = make_vector_from_pointer(TASK_SIZE,_finalPoint);
initialPosition = make_vector_from_pointer(TASK_SIZE, _initialPoint);
}
오류가 boost hpp file
입니다 Task.h
에 포함 된 storage_adaptors.hpp
에 정의되어 make_vector_from_pointer
기능에서 발생
#ifndef TASK_H
#define TASK_H
#include "storage_adaptors.hpp"
#include <boost/numeric/ublas/vector.hpp>
class Task {
private:
boost::numeric::ublas::vector<double> taskPosistionConstraint;
boost::numeric::ublas::vector<double> initialPosition;
boost::numeric::ublas::vector<double> finalPosition;
double pathLength;
int taskType;
public:
Task();
Task(double* _initialPoint, double* _finalPoint, int type);
double getLength();
int getTaskType();
~Task();
};
#endif /* TASK_H */
은이는 CPP 파일입니다. 헤더 내가 범위 오류에서 데 왜 클래스 헤더 파일에 추가하면 :
가 부스트 기능이 있다면Task.cpp:21: error: `make_vector_from_pointer' was not declared in this scope
'boost :: numeric :: ubas :: make_vector_from_pointer' 또는'cpp'에서 네임 스페이스 boost :: numeric :: ublas를 사용합니다. – maverik
누락 된 선언을 표시 할 수 있습니까? – juanchopanza
또한 클래스 "작업"과 메서드 "작업"을 갖는 것은 – Filip