Advertisement
Jakzon123

read/write test

Jul 13th, 2023
993
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 1 0
  1. #include <iostream>
  2. #include "File.h"
  3.  
  4. int main() {
  5.     std::string inputFilePath = "input/car.tga";
  6.     std::string outputFilePath = "output/cartest.tga";
  7.  
  8.     // Create an instance of the File class
  9.     File file(inputFilePath);
  10.  
  11.     // Print the header information
  12.     File::Header header = file.getHeader();
  13.     std::cout << "Header Information:" << std::endl;
  14.     std::cout << "Width: " << header.width << std::endl;
  15.     std::cout << "Height: " << header.height << std::endl;
  16.  
  17.     // Write the modified file to a new file
  18.     file.WriteFile(outputFilePath);
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement