How to make a fanction using c++ that returns the length of a string or array of characters? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to make a fanction using c++ that returns the length of a string or array of characters?

25th Dec 2016, 8:22 AM
ghasan
ghasan - avatar
2 Answers
0
I know for vectors you can use vector.size() . not sure what is for array, but maybe that helps you get the idea since vectors and arrays can be used interchangeably, but format is different.
25th Dec 2016, 8:31 AM
Kourosh Azizi
Kourosh Azizi - avatar
0
usually the size of array is given when you declare it.
25th Dec 2016, 9:08 AM
Kourosh Azizi
Kourosh Azizi - avatar