AIS
AIS copied to clipboard
Some truble
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?
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());