yup.. I have them defined as an int and charters. uuuummm... I'll post the code I have so far for that section. Maybe it's something in the code that's doing it...
Code:
int mattbview()
{
char buffer[256];
char buffer2[256];
int ammount;
ifstream mattb ("files/mattb.txt");
ifstream mattb2 ("files/mattb2.txt");
if (! mattb.is_open() && mattb2.is_open())
{
cout << "Error opening file";
EXIT
}
while (! mattb.eof() )
{
mattb.getline (buffer,100);
mattb2.getline (buffer2,100);
cout << endl << "Name: Matt Bilcliff";
cout << endl << "Pay $5/hour";
cout << endl << "Matt has worked ";
cout << buffer;
cout << " hours.";
cout << endl << "The boss has given a bonus of ";
cout << buffer2;
cout << " dollars";
ammount = buffer * 5 + buffer2;
printf("The total ammount of money owed to Matt is %i.\n",ammount);
mattb.close();
mattb2.close();
}
return 0;
}
Yes, it's not the cleanest mess of anything, but it's a start for now. I'll slim it down and try different things out later. lol.. Noticed that I like the cout to display the text?