#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;
    }
}