From: Michal M. <mi...@mo...> - 2004-09-24 09:45:48
Dmitry Sidorov wrote:
> Hello, dev-cpp-users.
>
> How could I create random number in dev-cpp? I cannot find random() nor
> srandomdev() in headers
rand(), srand()
buy some C reference :-)
From: Scott S. <age...@co...> - 2004-09-24 10:56:41
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
srand(GetTickCount());
int random = rand();
cout << "Your number is: " << random;
system("PAUSE");
return 0;
}
--Scott Simontis--
Michal Molhanec wrote:
> Dmitry Sidorov wrote:
>
>> Hello, dev-cpp-users.
>>
>> How could I create random number in dev-cpp? I cannot find random() nor
>> srandomdev() in headers
>
>
> rand(), srand()
>
> buy some C reference :-)
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>