+ 1

How to do array?

str.string(); what is this actually? which one is data type, which one is variable? please help me. And can anyone tells me what is palindrome and how to do the code. I don't want your answer, I just want explanation. teach me.

3rd Jan 2017, 4:37 PM
fazrina aznan
fazrina aznan - avatar
5 Answers
+ 6
"str" is the variable and ".string()" is a method (all class/object functions are called methods)
3rd Jan 2017, 4:40 PM
Valen.H. ~
Valen.H. ~ - avatar
3rd Jan 2017, 4:41 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 4
This is a friends palindrome checker in c++ https://code.sololearn.com/c068NSvabowx/?ref=app check it out.
3rd Jan 2017, 4:51 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
but...for example, I write a code that ask a user to enter a word. the purpose is to check whether the word is palindrome or not. but at the same time, I want compiler to automatically count the length of the word( as the array size) . how could I do that? should I use the "str.string();" ? but I still confused on how to use it. :(
3rd Jan 2017, 4:46 PM
fazrina aznan
fazrina aznan - avatar
+ 1
ok thanks ~~
3rd Jan 2017, 4:51 PM
fazrina aznan
fazrina aznan - avatar