CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: monarch_dodra

Search: Search took 0.04 seconds.

  1. Re: reading from file using a function problem

    your file is a stream, so it works the same ways as cin and cout, so...


    myFile >> a;
    myFile >> b;
    myFile >> c;
    myFile >> d;
    myFile >> e;
    if ( !myFile ) {std::cout << "an error occured" <<...
  2. Re: reading from file using a function problem

    Don't confuse the string object, and the character array.

    filename is a string. filename.c_str() is a character array.

    filename should already contain "youfilename.ext". If it doesnt contain...
  3. Re: reading from file using a function problem

    filename.c_str();


    1- Function name is c_str, not stx
    2- it is a function, not a member, so remember to add ().

    http://www.cplusplus.com/reference/string/string/...
Results 1 to 3 of 3





Click Here to Expand Forum to Full Width

Featured