Forum: C Dec 17th, 2006 |
| Replies: 13 Views: 7,323 UNIX only:
getenv("TZ");
will return the timezone setting. The result is in the form
xxxNxxx, example MST7MDT. TZ has to be set for localtime() to return the correct time. MST is GMT +7.... |
Forum: C Dec 12th, 2006 |
| Replies: 2 Views: 942 What normally is done (assuming that only one of the code pieces has a main() ) is to compile each of the sourcefiles into a separate object file and then link them all into one program.
To... |
Forum: C Dec 12th, 2006 |
| Replies: 7 Views: 2,463 This is allowable C, but can cause you problems if you are not super careful - meaning: it will cause problems. But it does answer your question.
#include <string.h>
int myfunc(const char *a,... |
Forum: C Oct 31st, 2006 |
| Replies: 2 Views: 900 Wow.
void main() - don't use void main. main() returns an int.
{
clrscr();
while(i--!=6) - where is i set to some intitial value?
i=i+2; - this is the end of the... |
Forum: C Sep 18th, 2006 |
| Replies: 5 Views: 1,600 HPUX supports alloca() -
it has advantages and disadvantages
good - it automatically frees all objects created by alloca calls when
the function making those calls exits
good - it is... |
Forum: C Sep 8th, 2006 |
| Replies: 5 Views: 4,931 cat /proc/meminfo
shows the current state of memory. The format varies somewhat with Linux distributions. My version of Linux has what you want in the 4 th column on the second line. So, you... |
Forum: C Aug 4th, 2006 |
| Replies: 7 Views: 1,744 You are not calling strtok correctly.
try something like this:
void foo(char *string1, char *string2)
{
char *first=strtok(string1,"|");
char *second=string2(string2,"|");... |