C ++ Eclipse talks about invalid arguments (enter incorrectly)

The code

g_CDioService->getDioPrjMgr()->NotifyBtMacAddress(std::string(path));

Declaration

void NotifyBtMacAddress(const std::string &path);

Eclipse emphasizes NotifyBtMacAddressand speaks

Invalid arguments 'Candidates are: void NotifyBtMacAddress(const ? &)'

I even tried to explicitly apply it to the expected type:

g_CDioService->getDioPrjMgr()->NotifyBtMacAddress(const_cast<const std::string & >(std::string(path)));

But still it gives the same (red underlined) error / warning.

I have access to the function source

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.
...
+4
source share
1 answer

IDEs usually cannot resolve some things (for various reasons), but this does not always mean that the code is incorrect.

So, just save the project or / and build it.


Another trick that sometimes works is: Project-> Index-> ​​Rebuild to get Eclipse to take a good look at everything again - credits: user4581301


, , .

+3

All Articles