Thread: static value for pointer?

  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, 03:06 PM
  2. seg fault at vectornew
    By tytelizgal in forum C Programming
    Replies: 2
    Last Post: 10-25-2008, 01:22 PM
  3. LNK2001 ERROR!!! need help
    By lifeafterdeath in forum C++ Programming
    Replies: 7
    Last Post: 05-27-2008, 05: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, 04:10 PM