![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linux Going Big Time and Prime Time Against Windows, UNIX (WSJ) (Addict 3D) | iBot | UNIX and Linux RSS News | 0 | 06-21-2007 04:10 PM |
| Start time/end time and status of crontab job | thambi | Shell Programming and Scripting | 3 | 05-16-2007 10:24 AM |
| How To Provide Time Sync Using Nts-150 Time Server On Unix Network? | pesty | UNIX for Advanced & Expert Users | 2 | 03-22-2007 02:20 AM |
| Losing Time/Time cloclk | azdauk | UNIX for Dummies Questions & Answers | 4 | 11-06-2003 09:33 AM |
| default time in Solaris 8 for time-wait | eloquent99 | UNIX for Dummies Questions & Answers | 1 | 04-01-2003 09:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
just a little more help for the C noob like myself.
i get these errors when i try to compile it. I must admit i do not know C.
OS=sol8 platform=E3500 (sparc) Code:
$ cat milli.c
#include <stdlib.h>
#include <sys/time.h>
struct timeval tv;
struct timezone tz;
struct tm *tm;
gettimeofday(&tv, &tz);
tm=localtime(&tv.tv_sec);
printf(" %d:%02d:%02d %d \n", tm->tm_hour, tm->tm_min
,m->tm_sec, tv.tv_usec);
$ gcc milli.c
milli.c:7: parse error before '&' token
milli.c:7: warning: data definition has no type or storage class
milli.c:8: conflicting types for `tm'
milli.c:6: previous declaration of `tm'
milli.c:8: warning: initialization makes integer from pointer without a cast
milli.c:8: initializer element is not constant
milli.c:8: warning: data definition has no type or storage class
milli.c:9: parse error before string constant
milli.c:10: warning: conflicting types for built-in function `printf'
milli.c:10: warning: data definition has no type or storage class
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|