comp.lang.c
  Home FAQ Contact Sign in
comp.lang.c only
 
Advanced search
February 2008
motuwethfrsasuw
    123 5
45678910 6
11121314151617 7
18192021222324 8
2526272829   9
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Associative Array in C         


Author: chadsspameateremail
Date: Mar 2, 2008 20:24

What I am trying to do is implement a associative array to lookup data
based on a key in C. This might simple to do in C++ or Perl but I'm
restricted to use C. The size of the data for the table isn't too
large but too large to structure the code as a clean chain of if/else
or similar logic. Also, the lookup key values can be large,
unpredictable and not well dispersed which doesn't suit itself to a
hash table.

OK so my current idea for implementing this is using an array of C
structures which gets initialized and contains all the relevant
information. The array will be a module global variable used in the C
file which needs this functionality. The array definition would look
something like the following:

struct ErrorLookupTable
{
long DeviceErrorCode;
char* ErrorString;
};

#define TableSize 6
Show full article (1.63Kb)
6 Comments
  struct declaration (silly question)         


Author: Marcin Kasprzak
Date: Mar 2, 2008 17:12

Hello Guys,
Silly question - what is the most elegant way of compiling a code similar
to this one?


typedef struct a {
b_t *b;
} a_t;

typedef struct b {
a_t *a;
} b_t;

int main(void) {

return 0;
}


my solution is to simply change type "b_t" to "void" but I'm not sure
if that's the best way of dealing with this issue.

Thanks,

--
Marcin Kasprzak
5 Comments
  Super squirrel         


Author: deia
Date: Mar 2, 2008 13:15

Super squirrel

Here is a nice ad with "the squirrel"

http://www.mediaportal.ro/play.php?pid=13539&Super%%20Squirrel%%20Scream
no comments
  plz send logic to write given program.         


Author: pitamber kumar
Date: Mar 2, 2008 12:25

Write a program to find the number of and sum of all intergers greater
than 100 & less than 200 that are divisible by 7.
21 Comments
  printf() and void *         


Author: Ioannis Vranos
Date: Mar 2, 2008 09:59

I recall from previous discussions here, that we must cast a non-void
pointer to void * before printing its value with printf("%%p"). Is it
true, and if yes why?
33 Comments
  makefile knowledge neede         


Author: Sheldon
Date: Mar 2, 2008 09:28

Hi everyone,

I have a problem: when running the make command. My script is compiled
but when the makefile gets to the library that is to be included, I
get a long long list of "undefined reference to " something in the
library. Now I have tried to pipe the makefile output to a file in
order to examine it from start to end but ">" doesn't work and the
terminal window only scrolls back so far. This has not happened to me
before so I am fresh out of ideas. Does anyone know how to pipe the
make output to a file or has something like this happened to you
before and you have some idea what the problem is?

tail of error results
snip.....
: undefined reference to `fio_fmtr_end'
/path/libbufr.a(emosnum.o)(.text+0x11d): In function `emosnum_':
: undefined reference to `fio_src_info'
snip....

I know that this library is good and functioning ok.

Any help is appreciated!

Sheldon
2 Comments
  "For" not functionning         


Author: Daniel.C
Date: Mar 2, 2008 07:50

Hello.
I'm a complete beginner and I cant go through the third exercise of my book
;-(((
I wrote :
#include

main()
{
int fahr;
for (fahr = 300; fahr <= 0; fahr = fahr - 20)
printf("%%3d %%6.1f\n", fahr, (5.0/9.0)*(fahr-32));
}

There is no output. The reverse (from 0 to 300) is OK.
I'm using MinGW with windows XP.

What's wrong ?
Thanks in advance.
Daniel
5 Comments
  Get all digital products in Non P Book Shop         


Author: DennisYoung123
Date: Mar 2, 2008 07:07

Get all digital products in Non P Book Shop

In this site http://BookSho.com you can get everything you need in 1
minute.There are about 25,000 digital products including:

Novels&eBooks,Money&Employment,Home

Business,Cooking&Recipes,Fun&Entertainment,Health&Fitness,

Politics&Government,Investigation,Love&Romance,Casino,Debt,moneymaking,finance,Resume,

Education,SelfEmployment,Investment,Entrepreneur,HomeBusiness,Finance,Jobs,paid

surveys,ebooks,Classified,Tarot,Music,Humor,Hobbies etc...

Just have fun at http://BookSho.com And Add it to your favorite!!
thanx!! :)
no comments
  printf("%%f") question         


Author: Ioannis Vranos
Date: Mar 2, 2008 05:16

If we want to print a float with printf, a printf("%%f", x); is
sufficient, or a cast is needed like in printf("%%f", (double)x); ?
16 Comments
  One picture explains the complete Oracle environment - Isn't it?         


Author: takveen
Date: Mar 2, 2008 04:52

One picture explains the complete Oracle environment - Isn't it?

http://www.takveen.com/download/ebooks/oracle10g_md_smpl/oracle10g_md...

Thank you.
no comments
1 2 3 4 5 6 7 8 9