Beginner question ofToString() :))))))))

Why this gives me an “Invalid arguments” error at the ofToString() part of the last line?

std::vector<int> nums;
std::string str = ofToString(nums[0]);

Where this one doesn’t:

std::string str = ofToString((int)nums[0]);

that’s really strange it should work. i just tried in linux and it works, it might be something with android compile but it’s just gcc so not sure what might be going on. have you tried that same code on an empty project? it might be comming from somewhere else

Oh it works inside a different class. Yes it comes from somewhere else. Thanks. I am going to search the problem :slight_smile:

I included the header of the working class to the header of error generating class and the error is gone (In fact there is nothing different in these to headers)

I have the same issue sometime in the NULL variable as well.

This is probably an Eclipse issue. Anyway i solved it for now. Thanks again.