First of all your code is symantically invalid. For example the expression statement
int size=sizeof(text);
will give you the size of the pointer that is usually equal to 4 bytes on 32-bit systems not the size of the character string pointed by this pointer.
As for a synax error I do not see such an error. Myabe you made a typo when you were transfering the code from one compiler to another.
Then you should post some context (surrounding code and line number).
The indentation in that code is way off, so that's an indicator that this isn't actually a free-standing function.
OK solved that...Somewhere in the code there was a define for letter 'č' that is not supported by C::B or wxDev, so it got translated to 'ch', which caused the incoming variable to be a defined constant...