c++ library einbinden in avr studio

OP #2880815
Lesenswert?

also etwas genauer.....

die Fehlermeldung lautet:

WString.h:28: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'String'

Das soll mir sagen, das die source (WString.cpp) nicht als c++ erkannt 
wird, richtig??

der Code in WString.h:28 lautet:

class String
{
  public:
    // constructors
    String( const char *value = "" );
    String( const String &value );
    String( const char );
    String( const unsigned char );
    String( const int, const int base=10);
    String( const unsigned int, const int base=10 );
    String( const long, const int base=10 );
    String( const unsigned long, const int base=10 );
    ~String() { free(_buffer); _length = _capacity = 0;}     //added 
_length = _capacity = 0;

    // operators
    const String & operator = ( const String &rhs );
    const String & operator +=( const String &rhs );
    //const String & operator +=( const char );
    int operator ==( const String &rhs ) const;
    int  operator !=( const String &rhs ) const;
.
.
.
usw.


Gruß
Michael

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren