Guild Attendance Checker Program
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
int GuildMember1 = 0;
char answer;
ofstream outFile;
outFile.open("D:\\Attendance.txt");
if (outFile.fail())
{
cout << "Error opening \"Attendance.txt\" for output.\n";
return 1;
}
cout<< "Welcome to Attendance Checker Version 0.01 \n";
cout<<"Is GuildMember1 present? y/n.\n";
cin >> answer;
if (answer == 'y')
{
GuildMember1=0;
}
else if (answer == 'n')
{
GuildMember1= GuildMember1+1;
} else {
std::cout << "Invalid answer '" << answer << "'" << std::endl;
}
cout<< " Absent Counters = "<<GuildMember1<<"\n";
cout<< " Finished Checking Attendance.\n";
cout<< "Text file saved in D:\\Attendance.txt\n";
cout<< " Thank you for using Uxhal Attendance Checker 0.01\n";
outFile << "GuildMember1's Name = "<<GuildMember1<<" \n";
outFile.close();
system("PAUSE");
return 0;
}
#include <fstream>
#include <string>
using namespace std;
int main()
{
int GuildMember1 = 0;
char answer;
ofstream outFile;
outFile.open("D:\\Attendance.txt");
if (outFile.fail())
{
cout << "Error opening \"Attendance.txt\" for output.\n";
return 1;
}
cout<< "Welcome to Attendance Checker Version 0.01 \n";
cout<<"Is GuildMember1 present? y/n.\n";
cin >> answer;
if (answer == 'y')
{
GuildMember1=0;
}
else if (answer == 'n')
{
GuildMember1= GuildMember1+1;
} else {
std::cout << "Invalid answer '" << answer << "'" << std::endl;
}
cout<< " Absent Counters = "<<GuildMember1<<"\n";
cout<< " Finished Checking Attendance.\n";
cout<< "Text file saved in D:\\Attendance.txt\n";
cout<< " Thank you for using Uxhal Attendance Checker 0.01\n";
outFile << "GuildMember1's Name = "<<GuildMember1<<" \n";
outFile.close();
system("PAUSE");
return 0;
}
Hi guys! I'm trying to create a program in C++ that helps me check our Guild's attendance. xD
I want to ask for some help and tips on what to do..
My Thoughts:
- It's a bit complicated (my real code that is) since there are a lot of type "int" which is used to determine the value of the Guild Member.
- I tried using Array to read and edit the values, but I never got the gist of it ._.
My Questions :
- How do I edit the text file straight from the program? like grab the Absent Counter value and edit it. o.o
- Is there a way to do this online? I mean.. the program grabs the names and their counters from a certain website which contains the text file? if so how? :O
Plans/Ideas/Thoughts about my program :
- If you are absent you get 1 Absent Counter.
- If you are present your Absent Counters reset to 0.
- If your Absent Counters reach 5 you will be Terminated.
- If your Absent Counters reach 4 you will recieve a Warning.
NOTE :
- I would kindly accept any aid you may give.
- I am not sure whether I am in the right thread to post this or not.
- I am not that good with C++ so please be gentle, I would be very delighted if you would help.



