I’m facing a problem in Xcode with the operator keyword. I have this in a header file (.h) but Xcode recognizes it as a keyword due to operator overloding in C++, even though I’m setting the file type as a default C header and not C++ header. The code I’m trying to compile is all written in C and the line of code i’m having problem is like this
struct foo {
int a;
int b;
...
char operator[80];
}
I’m stuck with this a while now. The reason for the operator to be used as a variable name is not in scope now becouse this is a cross plataform code that I can’t change and is compilable in many other plataforms for low-level devices.
Any help will be appreciated.
How about if you used the pre-processor:
? Put the above in a header file that is read in before your header.