+ 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.
5 Answers
+ 6
"str" is the variable and ".string()" is a method (all class/object functions are called methods)
+ 5
As for palindrome :
https://www.sololearn.com/Discuss/153117/?ref=app
+ 4
This is a friends palindrome checker in c++
https://code.sololearn.com/c068NSvabowx/?ref=app
check it out.
+ 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. :(
+ 1
ok thanks ~~