pages:
  • 1
K-Han SAYS

I have 2 questions in relation of this problem : 1. How can I get sveral lines and move theme in a srting variable? 2. how can I implement this : "All lines will be at most 64 characters, plus a trailing end-of-line character." ?

AMiR SAYS

You can use getline in c++.

#include <iostream>
using namespace std;
int main () {
    string s;
    while (getline(cin , s)) {
        // `s` is one line of input. do what ever you want to it
    }
    return 0;
}

If you use string, maximum length of 64 should not be your concern!

K-Han SAYS

thank u so much! :)