input full line as input in cpp

To input a full line as input in C++, you can use the getline function which is part of the <string> library. Here's an example of how you can do this:

#include <iostream>
#include <string>
using namespace std;

int main() {
    string fullLine;
    cout << "Enter a full line of text: ";
    getline(cin, fullLine);
    cout << "You entered: " << fullLine << endl;
    return 0;