This is the code:
#include <iostream>
#include <string>
#include <cstdlib>
#include <sstream>
int main()
{
      char str1[100];
      char str2[100];
      getline(str1,100,'\n');
      getline(str2,100,'\n');
      return 0;
}
I want to read string and store it in array so I in am using this method but it shows the following error on compiling
   [Error]138: error: `getline' was not declared in this scope
What is the method of reading string in array.?
 
     
     
    