I tried removing the ".h" from the iostream but then I get a whole bunch of errors. I didn't realize I left the random.h in there. thank you for pointing it out.
Printable View
I tried removing the ".h" from the iostream but then I get a whole bunch of errors. I didn't realize I left the random.h in there. thank you for pointing it out.
did you remember the "using namespace std;" part?
No I didn't remember that part. I will try that. I am sure it is obvious that I am new to this. Thanks for pointing it out
I doubt that will support the readability of the script :\Quote:
Originally posted by LuckY
but most simplified like this:
Code:if (temp == 0)
break;
else {
//...
}
I put that in but I am still getting errors. If I use it as #include <iostream.h> it works ok. I have no Idea what I am doing wrong. I still can't get it to actually give out random numbers, it keeps giving me the same numbers all the time.Quote:
Originally posted by major_small
did you remember the "using namespace std;" part?
you probably just have an old compiler... just keep the <iostream.h> then...
I was merely trying to learn thatdude about how to block code, not how to write the most readable code, but thanks for your comment either way.Quote:
Originally posted by Felix
I doubt that will support the readability of the script :\
Am I doing something wrong with the random function? It keeps generating the same bumbers all the time.
Did you seed the random number generator? srand(time(NULL));
yes, you missed out your "randomize()" function in your program.
Yeah i figured that out, it was merely to stop the other guy from making "errors" like that.Quote:
Originally posted by LuckY
I was merely trying to learn thatdude about how to block code, not how to write the most readable code, but thanks for your comment either way.