1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

C Programming

Discussion in 'C' started by rajib, May 21, 2007.

  1. rajib

    rajib New Member

    Joined:
    May 18, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    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.
     

Share This Page