0
Why my doesn't print the size of string array?
https://code.sololearn.com/c5Mu93LXxeu1/?ref=app I try to split string with delimeter and I try it with string array. But something is not correct. Need your help.
4 Antworten
0
a1 is an array there, not string..
You can print array size by using
cout << (sizeof(a1) /sizeof(a1[0])) ;
0
Yes, but I want to split string a into chunks. Or how to do it. Why it is not possible with a1.size()?
0
a1 is an array and array don't have a method size().
You are splitting string 'a' into length 6 string in array a1, check this by
cout<< a1[b-1] << endl;
inside outer loop.. After end of inner loop.
and size can determined by above previouly posted formula.
0
What is the goal of the code? how you'd like to split the string, and how the expected result should be?