c++ Datentypen-Problem
-
Hallo Ich bin neu im c++ Programmieren.
Jetzt habe ich hier eine Methode, der u.a. eine PortNummer und ein Login übergeben werden. Code:Invoke_Method_Status Device_Provider::setPort( const Device* self, const Property<uint8>& Port const Property<String>& Login) { switchport = Port; }Mein Problem ist der folgende Error:
cannot convert const cimple::Property<unsigned char> to int in assignment
Ich verstehe nicht, der Parameter ist doch ein uint und kein unsigned char??
Danke für eure Hilfe.
Grüße, rob
-
Lies genauer:
Portist einconst cimple::Property<unsigned char>. Und der Compiler sagt dir, dass er das nicht in einen int (was anscheinend er Typ vonswitchportist) kovertieren kann. Mehr kann man ohne Code nicht sagen.