#include <iostream>
#include <fstream>
using namespace std;
int main()
{
string account;
char reason[255];
string action;
cout << "This is created by xje \nYou have choisen to add a new item to ur logfile.\n\n";
cout << "If there is no input needed just press enter, or fill in 0.\n";
cout << "Account name:";
cin >> account;
cout << "Reason:";
cin.getline(char, reason[255]);
cout << "Action:";
cin >> action;
ofstream bestand;
bestand.open("gmlog.txt", ios_base::app);
if(!bestand.is_open()) {
cerr << "Could not open the GM log." << endl;
exit(1);
}
bestand << "Account: "<< account << endl;
bestand << "Reason: " << reason << endl; // how i do this lol
bestand << "Action: " << action << endl;
bestand << "-------------------" << endl;
bestand.close();
return 0;
}
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
cout << "This is the GMlog organizer from xje by xje :P keke.\n";
cout << "Basicly if this shit doesnt work well nvm it than.\n";
cout << "Btw p4ra loves lemmings <3. \n\n";
string gm;
cout << "Welcome, please enter your name:[GM]";
cin >> gm;
// Begin writing
ofstream bestand;
bestand.open("gmlog.txt");
if (!bestand.is_open()) {
cerr << "Could not make the Log file." << endl;
exit(1);
}
bestand << "------------------------------" << endl;
bestand << "-- Gm Log From:[GM]" << gm << " --" << endl;
bestand << "------------------------------" << endl;
bestand.close();
return 0;
}