-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Labels
Component: PreprocessorThe Arduino sketch preprocessor converts .ino files into C++ code before compilationThe Arduino sketch preprocessor converts .ino files into C++ code before compilation
Milestone
Description
This is Issue 297 moved from a Google Code project.
Added by 2010-07-22T00:52:26.000Z by GorillaCoder.
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-Medium
Original description
Try to compile the below sketch:
class SleepCycle {
public:
SleepCycle( const char* name );
int foo;
}; // class SleepCycle
SleepCycle::SleepCycle( const char* name )
: foo ( 0 )
{
}
The c++ compilation fails because the generated c++ is bad:
include "WProgram.h"
foo ( 0 );
class SleepCycle {
public:
SleepCycle( const char* name );
int foo;
}; // class SleepCycle
SleepCycle::SleepCycle( const char* name )
: foo ( 0 )
{
}
It can be fixed by removing the spaces between the name and paren in the initializer for foo.
: foo( 0 )
Metadata
Metadata
Assignees
Labels
Component: PreprocessorThe Arduino sketch preprocessor converts .ino files into C++ code before compilationThe Arduino sketch preprocessor converts .ino files into C++ code before compilation