system
1
I have search laster topic, but them not help me.
my program error when I insert this code to program:
KhoiGach *taokhoiGach(int id){}
error: doan.ino:13: error: expected constructor, destructor, or type conversion before '*' token
#include <PCD8544.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
#include <MatrixMath.h>
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);
#define PIN_SCE 7 //<== this is line 13 (doan.ino:13)
#define PIN_RESET 6
#define PIN_DC 5
#define PIN_SDIN 4
#define PIN_SCLK 3
typedef struct{
int **arr;
int Row,Col;
int iBoard,jBoard;
}KhoiGach;
KhoiGach *taokhoiGach(int id){}
void setup() {}
void loop() {}
I using IDE Arduino 1.5.6-r2, and with vs 1.0.5-r2 I have this error too.
The short answer:
Put this function declaration below the KhoiGach struct but before the function definition.
KhoiGach *taokhoiGach(int id);
Long answer ( my FAQ, it is about a function parameter, but affects a return value the same ):
http://arduino.land/FAQ/content/2/13/en/my-class_reference-won_t-work-in-the-sketch.html
system
3
pYro_65:
The short answer:
Put this function declaration below the KhoiGach struct but before the function definition.
KhoiGach *taokhoiGach(int id);
Long answer ( my FAQ, it is about a function parameter, but affects a return value the same ):
http://arduino.land/FAQ/content/2/13/en/my-class_reference-won_t-work-in-the-sketch.html
oh. I think it like C++ 
wow. thank you very much.