im gonna try
while(ifs != inFile.eos())
sum+=static_cast<int>(ifs.get());
Type: Posts; User: kilastria
im gonna try
while(ifs != inFile.eos())
sum+=static_cast<int>(ifs.get());
hmmm..that would be all fine and dandy, except I cant change the header files. I tried to use static_cast<int> to change from char to ASCII, but the compiler complains. I think it has something to do...
I didnt really want to move the information to another file, because I need it to do more calculations. This bit is really bugging me, and its the first step in the prgram, everthing else Ive been...
ok, heres the code;
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
int main()
Hey,
Im having trouble converting each character from a string in a file to ASCII. I tried to use inFile and put each character into a variable, then convert the variables using static_cast<int>,...
Thakyou so much, i will try this-it sounds right to use modulo, i thought thats how it would go. Now I just have to work out how to write it!!
Hey,
I am also doind this basketball program, but fortunately I have my algorithms correct, and sorry I cant tell you. BUt I do need help with one thing, how do you round the answer to the nearest...