I'm trying some codes about string arrays and taking array length. But i have some problems. I can't get length of string and can't send to a function.
------------------------
#include<iostream>
#include<cstring>
#include<string>
To my knowledge, the string library has some kind of built-in function for getting the length of the string. It would probably look something like this:
1 2 3 4 5 6 7 8
std::string InputWord;
cout<<"Enter a word";
cin >> InputWord;
GetLength(InputWord);//error
//and then to get the length, you would do something like this
InputWord.length();
Also, for your matrix problem, you'll need to have a for loop, or nested (if you have a 2D array) that will read each string.