Help, what am i missing

#include <iostream>
#include <ctime>
#include <cstdlib>
#include <valarray>
using namespace std;


int main()
{


val seed=let
val m=Date.minute(Date.fromTimeLocal(Time.now()))
val s=Date.second(Date.fromTimeLocal(Time.now()))
in Random.rand(m,s)
end;

int max, random_number;
cout << "please input max integer: ";
cin >> max;

srand(time(0));
random_number = (rand () % max) + 1000;

cout << random_number << endl;
system("pause");






return 0;
}
What do you mean by "missing"?

* Do you have a problem with compiling? The compiler does give error messages that tell what it sees as syntax errors. Those messages are very useful. If you have them, then show them. Eventually, you will learn to read them.

* Does the program compile, but crash when run? Syntax was legal, but logic was flawed.

* Does the program compile and run, but the results are unexpected? Still an error in logic.


(I can already see some issues, but I'd rather see your details first.)


EDIT
When you double-post, you waste people's time.

http://www.cplusplus.com/forum/general/243937/
Last edited on
Topic archived. No new replies allowed.