Horje
c++ get file content Code Example
c++ get file content
#include <fstream>
#include <string>

int main(int argc, char** argv)
{

  std::ifstream ifs("myfile.txt");
  std::string content( (std::istreambuf_iterator<char>(ifs) ),
                       (std::istreambuf_iterator<char>()    ) );

  return 0;
}




Cpp

Related
find largest number in vector c++ Code Example find largest number in vector c++ Code Example
lpcwstr to string c++ Code Example lpcwstr to string c++ Code Example
‘setprecision’ was not declared in this scope Code Example ‘setprecision’ was not declared in this scope Code Example
remove or erase first and last character of string c++ Code Example remove or erase first and last character of string c++ Code Example
c++ estimate deciimal to a point Code Example c++ estimate deciimal to a point Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8