using .length()

i have this for my code

1
2
3
4
5
6
7
8
string str;
int len;

str = ReadStr();

len = str.length();

return len;


I am getting an error saying no function definition allowed there... any ideas??
Post your whole code. It sounds like you're declaring a function inside another function, check or you dont have the datatypes in front of functioncalls.
One problem you might have (as I had it) is that you have missed a } bracket or added too many.
Topic archived. No new replies allowed.