static value for pointer?

This is a discussion on static value for pointer? within the C Programming forums, part of the General Programming Boards category; Hi all, I am curious to know if we can set the pointer to string, a static through-out the program!! ...

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    8

    static value for pointer?

    Hi all,

    I am curious to know if we can set the pointer to string, a static through-out the program!!

    Can we do that? Any suggestion please.

    Thanks a lot in advance.

    Palku

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Code:
    static char* example;
    Surely by "throughout the program", you mean it persists the lifetime, not scope?

  3. #3
    Registered User
    Join Date
    Sep 2005
    Posts
    8
    Thanks a lot!!!!!!

    )
    It shows I m really newbe
    )

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 04:06 PM
  2. seg fault at vectornew
    By tytelizgal in forum C Programming
    Replies: 2
    Last Post: 10-25-2008, 02:22 PM
  3. LNK2001 ERROR!!! need help
    By lifeafterdeath in forum C++ Programming
    Replies: 7
    Last Post: 05-27-2008, 06:05 PM
  4. get keyboard and mouse events
    By ratte in forum Linux Programming
    Replies: 10
    Last Post: 11-17-2007, 05:42 PM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 05:10 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21