Answers for "line in c++"

C++
13

get line C++

// extract to string
#include <iostream>
#include <string>

int main ()
{
  std::string name;

  std::cout << "Please, enter your full name: ";
  std::getline (std::cin,name);
  std::cout << "Hello, " << name << "!n";

  return 0;
}
Posted by: Guest on November-16-2019
1

how to print in new lines in C++

#include<iostream.h>
void main()
{
  cout<<"First Linen";
  cout<<"Next Line";
}
Posted by: Guest on August-04-2020

Browse Popular Code Answers by Language