// Write a program to find the length of the string “refrigerator”.
#include
using namespace std;
main()
{
string name =“refrigerator”;
int length =strlen(name); // shows Error in this line
cout<<“the size of refrig. is :==”<<length<<endl; return 0; }
if I use char name[ ] = " refrigerator";
then it works fine why it is show error in that line?