Check that you are not using the define in the function. Where ever you use the define, whether in the main code or a function, the anomalous effect will be the same.
What the book is saying is to rather write a function to do the same thing, ie:
int max(int a, int b)
{
return( a>b ? a ...
Hi nanimo
As far as I'm aware, Visual C++ doesn't have a randomize() function. That was only in the old Borland Turbo C++. The way to randomize in VC++ is by using the ANSI srand() function, which takes a longint "seed" argument.
For reasonable randomness, this seed can be taken...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.