2010-09-22, 08:24 AM
wow.... maybe trying to call the information from a file wasn't a good idea lol. It seems way more complicated than I thought it would be. I thought I could just do something like
call(insert file path here);
and that would be it. I guess I was wrong eh?
Well here is the code I have going for the rand function. I'm surprised it was so easy to write.
gonna keep playing with it of course, but I got it spitting out random numbers and storing it into my array.
call(insert file path here);
and that would be it. I guess I was wrong eh?
Well here is the code I have going for the rand function. I'm surprised it was so easy to write.
Code:
#include <iostream>
using namespace std;
int random();
int main()
{
int array[10];
int x;
srand ( time(NULL) );
for (x=0; x<10; x++){
array[x]=random();
cout<<array[x]<<endl;
}
system("pause");
return 0;
}
int random()
{
int number;
number=(rand()%11);
return (number);
}
