I have to solve this programming exercise and I don't know how to do it.
Write a program to read strings from the standard input, concatenating what is read into a large concatenated string next...
Type: Posts; User: piero borrelli
I have to solve this programming exercise and I don't know how to do it.
Write a program to read strings from the standard input, concatenating what is read into a large concatenated string next...
so i should the compare the characters of two strings object ? why if i change the value of str to "Hhllo" str is not greater than slang ? 'h' is bigger than 'i' right ?
In my book I have the following example :
std::string str = "Hello";
std::string phrase = "Hello world";
std::string slang = "Hiya";
and i have these two rules to...
i can't understand.:frown:
why in this program the end of file sequence works :
#include <iostream>
#include <string>
i have a question, i'm studyng the string library type and i have to write this program :
std::string word;
while (std::cin >> word) {
std::cout << word << std::endl;
}