AIS icon indicating copy to clipboard operation
AIS copied to clipboard

Some truble

Open olhovick opened this issue 4 years ago • 1 comments

Hi!

If my code:

String cc; ... ... cc = "344c;V5000R:Qn4RBD@N42jV2Dur,0*6F" AIS ais_msg(cc); showMMSI(ais_msg); showSOG(ais_msg); showCOG(ais_msg); showLatitude(ais_msg); showLongitude(ais_msg);

I've this error: AISDecode:120:18: error: no matching function for call to 'AIS::AIS(String&, int)'

What's a problem with my code?

olhovick avatar Nov 12 '20 16:11 olhovick

The constructor of the AIS class takes a const char* and optionally and int. You provide a string (or string&). Try AIS ais_msg(cc.c_str());

KimBP avatar Nov 13 '20 21:11 KimBP