Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'time' function has gone bad on me

Status
Not open for further replies.

RandallW

Programmer
Jun 24, 2000
18
US
I've been using this piece of code that caused no compiler
trouble:
Code:
 srand ( ( unsigned ) time ( NULL ) );

Now it doesn't compile...it gives me "error C2064: term does
not evaluate to a function".....I checked error from the CD
and it shows examples such as integer being used like a function; nothing like my problem.

I'm pretty sure my problem is with 'time'...i've tried using it different ways, such as
Code:
 time ( &generated_time )
...same error

Also, i've goofed the way my windows show up now ( i'm working with Microsoft C++ ver 4.0 ), so the ability to have two windows showing with a vertical line ( that splits
them ) that can be moved horizontally has been lost, and I don't know where the setting is to get it back.

On top of that, I can't get the Contents listing of my Help files on the CD to show. I'm in a sucky mood right now. :(
 
Dear RandallW,

Are you including the header file that declares the time() function?

I don't know about the rest of the VC++ 4 questions, it's been a long time since I worked with that version.

-pete
 
RandallW,

I have no problem compiling that line of code. The error may be occuring the line prior to that one.

Good luck
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top