![]() |
| ||
| Compile time errors in C++ while generating random numbers 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 I checked my old Borland C++ compiler, you may have to add the .h to your includes! #include<iostream.h> #include<cstdlib.h> |
| ||
| 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. |
| ||
| Re: Compile time errors in C++ while generating random numbers Quote:
|
| ||
| Re: Compile time errors in C++ while generating random numbers Quote:
Quote:
Obviously iostream worked. But cstdlib didn't. Change it to stdlib.h instead. We won't even mention math.h You might consider upgrading to at least Borland 5.5 Or one of these that have an IDE: Code::Blocks MSVC++ Express Open Watcom C++/Fortran Bloodshed DevC |
| All times are GMT -4. The time now is 2:34 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC