error: string does not name a type in a class

i feel really stupid with this and asking this question but here it gos.

i’ve made a class which needs some parameters in the constructor

like this:

in the .cpp file

CustomClass::CustomClass(string aString, string otherString, int numer)  

and in the .h file

string aString;  
string otherString  

when i try to build, it says error : string does not name a type, yet on testApp i have no issues using string.

how do i get rid of that error?

try adding this at the beginning of your .h file:

#include “ofMain.h”

thank you very much.
it worked!!!