Compile time errors in C++ while generating random numbers
Expand Post »
I have borland C++ compiler on my system.while generating random numbers in C++,though i have incuded #include<cstdlib> and #include<iostream> i get these errors
1.cannot open include file cstdlib
2.call to undefined function rand
please help me with a solution
Re: Compile time errors in C++ while generating random numbers
Can you please post your code here? That second part looks like you've not defined a function or something. Perhaps you've misnamed a function that you created, or you're #including a wrong library or something. Either way, post your code, and we'll be able to help you troubleshoot it.
I have borland C++ compiler on my system.while generating random numbers in C++,though i have incuded #include<cstdlib> and #include<iostream> i get these errors
1.cannot open include file cstdlib
2.call to undefined function rand
please help me with a solution
as for the second error its because your calling rand() which is in the file math.h try including that the compile again
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.