Why is it that this won't work?
These are the errors I get:Code:#include<string> #include<iostream> using namespace std; int main() { string text=("This is Text"); cout<<strlen(text); cin.get(); return 0; }
Just to make things a little more clear, I want to keep the variable 'text' as a string and not a char array.Code:no matching function for call to `strlen(std::string&)' candidates are: size_t strlen(const char*)
Thanks