#include #include // Required for file stream operations #include // Required for using std::string int main() { std::ifstream inputFile("il.bin"); // Open the file "example.txt" for reading // std::ifstream inputFile("filename.bin", std::ios::binary); // Check if the file was opened successfully if (!inputFile.is_open()) { std::cerr << "Error: Could not open the file." << std::endl; return 1; // Indicate an error } //int value; //inputFile.read(reinterpret_cast(&value), sizeof(value)) // Example: Reading a block of data into a vector of bytes // Determine file size first if reading the whole file //inputFile.seekg(0, std::ios::end); // Move to end of file //std::streamsize fileSize = inputFile.tellg(); // Get current position (file size) //inputFile.seekg(0, std::ios::beg); // Move back to beginning //std::vector buffer(fileSize); //inputFile.read(buffer.data(), fileSize); std::string line; // Read the file line by line while (std::getline(inputFile, line)) { std::cout << line << std::endl; // Print each line to the console } inputFile.close(); // Close the file when done return 0; }