#include <iostream>
#include <fstream>
#include <string>

void saveDataToCSV(const std::string& fileName, const std::string& data) {
    std::ofstream file(fileName, std::ios::app);
    if (file.is_open()) {
        file << data << "\n";
        file.close();
    } else {
        std::cerr << "Failed to open the file: " << fileName << std::endl;
    }
}

int main() {
    // Save historical bend data to a CSV file
    saveDataToCSV("historical_bend_data.csv", "Your historical bend data here");

    // Save machine data to a CSV file
    saveDataToCSV("machine_data.csv", "Your machine data here");

    return 0;
}