I'm using keil mdk V5, I included "string.h" but I still cannot use string, I get "error: use of undeclared identified 'string' message , anyone knows whats wrong with it?
That is most likely my issue since I never checked it out... but I cant seem to find where I can select compiler, could you tell me how I can do it?
Broman3100 said:I cant seem to find where I can select compiler
It's a single compiler - but it can be configured to treat your source as either C or C++
By default:
Or you can use one of the options described in the link I gave to set it explicitly:
I changed it to c++ but I keep getting the exact same error, any idea what else could cause the issue?
"string.h" is a C include file. It gives you the standard C "string" (array of NULL terminated chars) functions. It has no type or class called string.
<string> will give you the C++ string stuff.