Question involving using math operations...
Alright, I had posted a while ago about a project asigned to us by a teacher involving payrolls and everything. Well, I ditched the whole way we were doing it and started over with something that I hope will work better and it won't open all the files at once. :D Well, here's my question, I would like to multiply two values in 2 seperate files and have it displayed in another statement. I tried something simple:
Code:
ammount=buffer*5+buffer2;
printf("The total ammount of money owed to Matt is %i.\n",ammount);
buffer and buffer2 are the variables where the numbers in the files are stored. I was wondering why this won't work and if there might be a better way to do it (personally, I don't like to use the printf statement, as it looks sloppy to me). I get an error that says:
Quote:
error C2296: '*' : bad left operand
I'm just wondering, thanx...