none
Compiler Error C3861

    Question

  • Error  C3861: 'getline': identifier not found    


    program segment

    #include <string>

    int main ()
    {
      
         ..........
         ..........

        string path;
        cout << "Enter starting path ... ";
        getline(cin,path);

       ......
       ......


    }


    How to solve this one?

    Friday, June 19, 2009 8:58 AM

Answers

  • Hello Krish,

    Please include iostream header also.

    // Include this header
    #include <iostream>
    
    // I hope you already have this.
    using namespace std;

    Regards,
    Jijo.
    http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.
    Friday, June 19, 2009 9:15 AM