I'd like to show any character of a string separately.
I am using the library and the Idea is:
for(int i=0; i< input.size() ; i++)
cout<< input[i]<<endl;
}
The error is that "input.size()" is not an int, so I can't use the for sentence.
#include <string>
int main(){
string input;
for(int i=0; i< input.size() ; i++)
cout<< input[i]<<endl;
}
I except that it works, but I get an error:
main.cpp:9:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
9 | for(int i=0;i< recibir.size();i++) cout<<"hola"<<endl;