|
-
Sep 3rd, 2001, 10:36 AM
#1
Thread Starter
Addicted Member
Illegal Operation Error!!!!
I get an illegal operation error whenever I try to run this program:
Code:
#include <iostream.h>
#include <windows.h>
int main()
{
LPSYSTEMTIME lp_time;
float sec;
sec=NULL;lp_time=NULL;
while (1==1)
{
GetSystemTime(lp_time);
sec=lp_time->wSecond; //This line probably causes the error
cout<<sec;
}
return 0;
}
I think line 18 causes the error, becuase wenever I remove it and I ask it to cout the lp_time variable I don't get an error. Any ideas?
BTW, Thanks for all your help
Member of the anti-gay cross-dressing trans-species wolves alliance.
-
Sep 3rd, 2001, 10:44 AM
#2
Member
-
Sep 3rd, 2001, 10:48 AM
#3
PowerPoster
Remove the line that says "lp_time=NULL"
-
Sep 3rd, 2001, 04:17 PM
#4
Monday Morning Lunatic
Use SYSTEMTIME and pass &lp_time instead
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|