Web Development



A Problem with Dev C++ Compiler

By samira_hayat15 ·
I am trying to use the rand() function in the Dev C++ compiler. When i try to execute and run the whole code, the output window appears but is quickly followed by a "Send Error Report" window, i've tried to isolate the piece of code that was responsible for this and found out that if i comment out the following line, the rest works fine:

for (i=0;i<9;i++)

Does anyone have any idea why that happens? is it to do with the fact that i's value is being gotten through a loop? cz when i change 'i' and write rand()%2, it works.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Share your knowledge

Related Discussions

Related Forums