Skip to content

Compile error when declaring a pointer-function #2772

Closed
@happybrick

Description

@happybrick

I get a weird compile-error with self-written classes when i declare a function that returns a pointer to that very class. Can't figure out why.
UECIDE 0.8.7z36 compiles the example-code (ardubug.ino) without any errors though.
Using: Windows7-64bit, Arduino-IDE 1.6.1, Arduino Nano, ATmega328 ( Same problem for all other platines / prozessors, too )

--- Arduino-IDE - Error-Output:
ardubug.ino:2:1: error: 'MyClass' does not name a type
Fehler beim Kompilieren.

--- Code:
class MyClass{
public:
MyClass();
int value;
};

MyClass::MyClass(){
this->value = 101;
}

MyClass* someProcedure(){
return NULL;
}
void setup() {}
void loop() {}

Metadata

Metadata

Assignees

Labels

Component: PreprocessorThe Arduino sketch preprocessor converts .ino files into C++ code before compilation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions