Search Results

Showing results 1 to 7 of 7
Search took 0.04 seconds.
Search: Posts Made By: jim mcnamara ; Forum: C and child forums
Forum: C Dec 17th, 2006
Replies: 13
Views: 7,323
Posted By jim mcnamara
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
Posted By jim mcnamara
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
Posted By jim mcnamara
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
Posted By jim mcnamara
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
Posted By jim mcnamara
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
Posted By jim mcnamara
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
Posted By jim mcnamara
You are not calling strtok correctly.

try something like this:


void foo(char *string1, char *string2)
{
char *first=strtok(string1,"|");
char *second=string2(string2,"|");...
Showing results 1 to 7 of 7

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC