Search:

Type: Posts; User: piero borrelli

Search: Search took 0.00 seconds.

  1. How to read 2 adjacents strings object

    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...
  2. Replies
    3
    Views
    1,345

    so i should the compare the characters of two...

    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 ?
  3. Replies
    3
    Views
    1,345

    Rules to compare two strings object

    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...
  4. i can't understand.:frown: why in this program...

    i can't understand.:frown:
    why in this program the end of file sequence works :




    #include <iostream>
    #include <string>
  5. why my program doesn't read the end of file sequence

    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;

    }
Results 1 to 5 of 5