There is an error, that is showing on my local machine :
[Error] cannot convert ‘std::string {aka std::basic_string}’ to ‘const char*’ for argument ‘1’ to ‘size_t strlen(const char*)’
I’m using Dev-C++ ide.
I just replaced stren(str) with str.size() and it is working perfectly fine.
But, I want to know what was the problem and why it happened?