Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   C Programming (http://www.go4expert.com/forums/c-programming-t4389/)

rajib 21May2007 20:38

C Programming
 
I have a pointer to array declaration - char *properties[100] = {""};

I declared this as GLOBAL and accessed this from a function. When I print the values before elaving the function, it works fine. When I try to print the same after the function call in main(), still its fine..but after sometime (I didn't use this variable in between), it seems to take junk automatically.....

Can somebody pl suggest what to do to fix this?

Thanks for help.

Regards -
Rajib Roy.

DaWei 22May2007 01:19

Re: C Programming
 
The declaration is very suspicious. What you are declaring is an array that will hold 100 pointers to char. Was that your intention? Explain what you are trying to do with your program and show some code that uses the declared array. Please remain aware that YOU know what your code is supposed to do -- we don't. Always strive to provide meaningful information. My gypsy fortuneteller is on vacation.


All times are GMT +5.5. The time now is 15:22.