KimBP / AIS

An Arduino library able to decode AIS messages
Other
30 stars 9 forks source link

Some truble #9

Open olhovick opened 3 years ago

olhovick commented 3 years ago

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?

KimBP commented 3 years ago

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());