Working on this function and I cant figure out why my number 7 isnt working

Question is Write a function that will use a RNG to obtain 300 integer values between 32 and 126. The value and the corresponding ASCII character, its predecessor and its successor are printed.

What I have.

void findrandom()

{
int high=126;
int low=32;
int random, i, pred, succ;
double num;
char charval;

infile>> num>> high>> low;
outfile<<"Question #7 " <<endl;
for(i=0; i<=300; i++)
{
if(i%2 == 0){
outfile<<endl;
}
random=(rand()% (high-low+1) + low);
charval= static_cast<char>(random);
pred= static_cast<char>(random-1);
succ= static_cast<char>(random+1);

outfile<<charval<<" is value. ";
outfile<<pred<<" is predecessor. ";
outfile<<succ<<" is successor. ";
outfile<<random<<" ";
infile>>num;
}
outfile<< endl;
outfile<< endl;
}
What does
isnt working
mean, please?
I actually got it to work. I figured it out.
Topic archived. No new replies allowed.