Objectives : string constructors

  • File Name : string_getline1.cpp
  • Key Words:
    string:: getline(cin, str1);where str1 is an object of string class.
    istream& getline (char* ch1, streamsize n );where ch1 is a c_str
  • Code: string_getline1.txt

Step: 1 Create a source file.

Step: 2 Edit and save Source file

Step: 3 Runtime Views:

Step: Brief Discussion: string:: getline()