c++ get file content

include

include

include

int main() { std::string line; std::ifstream file("example.txt");

if (file.is_open()) {
    while (getline(file, line)) {
        std::cout << line << std::endl;
    }
    file.close();
}
return 0;

}