Function call mismatch

I wrote this program
//This programm is for testing function overloading
#include <string>
#include <fstream>
#include <iostream>
using namespace std;
class Text
string str;
Text ();
Text (string);
string contents ();
Text::Text (string st)
ifstream in (st);
getline (in, str);
string Text::contents ()
string ret;
return ret;
int main()
Text txt ("Sample.cpp");
string stg;
cout << "The output of the file is" << "\n" << stg;
I got the error at line 16 that no matching function for call
The information "line 16" is not very useful when you don't use code tags.
I did not find a syntax error.
Topic archived. No new replies allowed.