Hi.I want to know what is the problem in this program?
I can't build it for these errors in output:
2.cpp(10): error C2064: term does not evaluate to a function taking 1 arguments
2.cpp(11): error C2059: syntax error : ')'
2.cpp(13): error C2064: term does not evaluate to a function taking 1 arguments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//This program generetes random number.
#include <cstdlib>
#include<ctime>
#define randomize () (srand(time(0)))
#define random (25)(rand ()%25)
#include<iostream>
usingnamespace std;
int main()
{
for(int i=0;i<10;cout<<random(25)<<endl,i++);
randomize ();
cout<<"After call randomize function.\n";
for(int i=0;i<10;cout<<random(25)<<endl,i++);
return 0;
}
When I compile it I take only this warning:
" .cpp(7): warning C4244: 'argument' : conversion from 'time_t' to 'unsigned int', possible loss of data"
but I can't build it yet:-(