Q:

Error: The function "getLine" must have a prototype

I am trying to read string with spaces using getLine, but i am getting  error "Error: The function "getLine" must have a prototype.". I am getting this error even after including using namespace std;
   void buildAhardCodedSQL4() 
    {
       cout << "Enter source : ";
       getLine(cin,source);
    }

A:

Replace getLine(cin,source); with getline(cin,source);
For more information on how to use getline(), refer to the following: http://www.cplusplus.com/reference/string/string/getline/

