コードがC++ Eclipseは、無効な引数(入力修正しない)
g_CDioService->getDioPrjMgr()->NotifyBtMacAddress(std::string(path));
宣言が
void NotifyBtMacAddress(const std::string &path);
Eclipseは私もしようとしたNotifyBtMacAddress
を強調し、
Invalid arguments 'Candidates are: void NotifyBtMacAddress(const ? &)'
を言うであると言います実際に予想されるタイプに明示的にキャストしてください:
g_CDioService->getDioPrjMgr()->NotifyBtMacAddress(const_cast<const std::string & >(std::string(path)));
でも、同じ(赤い下線付き)エラー/警告が表示されます。
は私が
void CDioPrjMgr::NotifyBtMacAddress(const std::string &path){
// PASLOG(ZONE_FUNC, __FUNCTION__, "Sequence: PRJ_DIO -> PRJ_Manager : Send BT MAC ADdress");
// On recving Disable BT command, Send Mac Addres to Mgr.
...
@JonnyHenlyコードは問題ありません。私はeclipseがそうではないと思う理由を知りたい。 – Adrian
プロジェクトをビルドするときや入力したときにそれが表示されますか? – gsamaras
メソッドを定義しましたか、それともライブラリからですか? –