我正在爲移動機器人編寫一個.lib文件。 在關於機器人的運動等命令,我也有命令掃描藍牙設備看起來像:靜態庫頭中的void函數的問題
void ScanForDevices(vector<Device> &Robot)
{
/* code for searching Bluetooth devices and saving their names and addresses into vector of Device struct*/
}
我的問題是用寫的.lib文件的頭有關。
我的一個命令是:
string RobotMove(int Translation, int Rotation)
{
/* create Command
return string(Command);
}
在標題中,該命令我:
// Returns MOVE command
std::string RobotMove(int Translation, int Rotation);
我有問題,就是在爲標題寫:
void ScanForDevices(vector<Device> &Robot)
我不斷收到「不完整的類型是不允許的」是我嘗試做與RobotMove命令相同的方式。我是否必須以某種方式在頭文件struct Device中聲明?
您可能需要'#include'或'Device'的頭文件。 –
BoBTFish
我已包含。必須是設備標題然後。謝謝。 –
page47250