Thread: basic

  1. #1
    srinu
    Guest

    basic

    hello everybody,

    here i've a doudt is

    there any difference between


    const int i
    int const i;

    pls explain me


    bye
    thanx

    srinu

  2. #2
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    nope, no difference.

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    A difference only exists when you are using pointers right?

  4. #4
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    there's still no difference. you're probably thinking of the difference between constant pointers and pointers to constants.

    const int* a;
    int const* a;

    are the same. they are both pointers to constant ints

    HOWEVER

    int* const a;

    is a constant pointer to an int

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [ANN] New script engine (Basic sintax)
    By MKTMK in forum C++ Programming
    Replies: 1
    Last Post: 11-01-2005, 10:28 AM
  2. what are your thoughts on visual basic?
    By orion- in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 09-22-2005, 04:28 AM
  3. visual basic vs C or C++
    By FOOTOO in forum Windows Programming
    Replies: 5
    Last Post: 02-06-2005, 08:41 PM
  4. Basic Window Creation, Dev C++ 4.9.9.0 Linking Error
    By Tronic in forum Windows Programming
    Replies: 2
    Last Post: 11-27-2004, 06:03 PM