Unknown Error?

I do not know exactly what this error is trying to tell me. Am I missing a #include or something? If you know what it is talking about please give me a heads up on how I can fix this. <--- C++ Noob.
Error:
1
2
3
4
5
6
7
8
xc.cpp
c:\documents and settings\primary\desktop\xc\xc\xc.cpp(122) : error C3867: 'std::basic_string<_Elem,_Traits,_Ax>::c_str': function call missing argument list; use '&std::basic_string<_Elem,_Traits,_Ax>::c_str' to create a pointer to member
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>,
            _Ax=std::allocator<char>
        ]

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
void optioncon()//yes
{
    int opt1;
    string username3;
    string line;
    string information;
    string myfile;
    string filename2;
cout << "Option Con";
cin >> opt1;
if (opt1 == 1)
{
    {
string filename2 = "C:/u/" + username3 + "/information.txt";
  ofstream myfile (filename2.c_str);
  if (myfile.is_open())
  {
    myfile << cin << information << endl;
    myfile.close();
  }

  else{
      cout << errorfile1;
  }


}

if (opt1 == 2)
{
string filename2 = "C:/u/" + username3 + "/information.txt";

ifstream myfilx (filename2.c_str());
  if (myfilx.is_open())
  {
    while (! myfilx.eof() )
    {
      getline (myfilx,line);
      cout << line << endl;
      myfilx.close();
    }
  }
  else
  {
      cout << errorfile1;
  }

}
}
}
c_str should be a function call
Look at the difference between the way line 33 (correct) is written and line 15 (incorrect)
I see! Thank you so much! forgot the extra parenthesis.
Topic archived. No new replies allowed.