1. Header file: #include <cstring>
2.getline (cin, s) passes the input to s
3. What is the difference from cin?
Cin will stop reading when it encounters a space, but getline will not stop reading if it encounters a space.
1. Header file: #include <cstring>
2.getline (cin, s) passes the input to s
3. What is the difference from cin?
Cin will stop reading when it encounters a space, but getline will not stop reading if it encounters a space.