Hi,
I am trying to write a function but keep getting an error when I try to build. I'm not very experienced with c++ so I can't really figure out what the error means. The funcion is called like this:
and it looks like this:Code:nMarkerCount = netClient.GetMarkerCount();
I have declared it as public in the header file like this:Code:int BMLClient::GetMarkerCount(void) { if (!m_bConnected) return 0; //?? long cmd = 3; if (!Send(&cmd, sizeof(cmd))) { std::cout << "Unable to send <get marker data> command" << std::endl; return false; } long count; if (!Recv(&count,sizeof(count))) { std::cout << "Unable to get marker count" << std::endl; return false; } m_nMarkerCount = count; m_buffer = new double[count*3]; m_bConnected = true; return m_nMarkerCount; }
The error that I get says: error C2662: 'BMLClient::GetMarkerCount' : cannot convert 'this' pointer from 'const BMLClient' to 'BMLClient &'Code:int GetMarkerCount(void);
Can anyone tell from what I've posted what this error means? Thanks!



LinkBack URL
About LinkBacks



CornedBee