![]() |
Bugging ... Compile Time Error
I dont know whats terribly going wrong with this, well I know there's some memory allocation with this but I tried hard to fix it and when it gets fixed it doesn't shows up the desired value, this is the code that shows the compile-time error:
:
#include <stdio.h>... and this thing runs fine but doesn't shows any result: :
#include <stdio.h> |
It is usually helpful to provide SMALL code fragments that exhibit your problem, describe your problem clearly (eg what you expect to see vs what you see, what compiler errors, etc). Otherwise, the help you get will be limited.
Both of your code fragments will yield compile errors as; :
#define $WORD_LIST(X) "resource/" XAssuming you've somehow got past that with a compiler extension, the basic issue is that you are not understanding how pointers work or how arguments are passed by value to functions. For example, in your first block of code; :
int ccarray_create(ccarray *c)The result is undefined behaviour by the bucket full. - Even copying an uninitialised variable yields undefined behaviour (which is what happens simply by passing it by value to a function) - Dereferencing an uninitialised pointer also yields undefined behaviour. |
the point here is, if you submit 1,000 lines of code only the really good guys will look at it. i do this myself when my back is against a wall, so i'm NOT bitching at you. however, if you know WHERE your problem is, point it out with some relevant context.
good luck! |
| All times are GMT -5. The time now is 3:12 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC