CrazyEngineers
  • Mayank
    Mayank

    MemberNov 23, 2006

    Mayank's C/C++ Challenger III

    Hi All,

    Sorry for the delay in comming up with this post in the C/C++ Challenger Series. This time I again have something from the C++ corneršŸ˜.

    Question:
    How would you write a constant reference to a constant pointer to integer
    int i = 10 ;
    int *const ptr = &i ;

    So the syntax of the "integer" and the "pointer" is given. Tell me the way you will write the asked reference.
    Hoping for a lots of replies.;-)


    Thanks and Regards,
    Mayank Shukla.
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • desijays

    MemberNov 23, 2006

    int i = 10; // integer
    int *const ptr = &i; // constant pointer to an integer



    int *const & const i; //constant reference to a constant
    //pointer, that points to an integer.
    Are you sure? This action cannot be undone.
    Cancel
  • desijays

    MemberNov 27, 2006

    dear mayank, u there mate. i've posted the probable solution 3 days ago. Im still waiting for you to tell me if its right or wrong... 😀
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorNov 27, 2006

    desijays
    dear mayank, u there mate. i've posted the probable solution 3 days ago. Im still waiting for you to tell me if its right or wrong... 😀
    Hold on, Desijays 😀 !

    Mayank seems to be totally busy these days. I'll ask him to reply asap.

    -The Big K-
    Are you sure? This action cannot be undone.
    Cancel
  • Mayank

    MemberNov 28, 2006

    Hi desijays,

    You are absolutely correct \😁/

    Sorry for the delay friend, I was really very badly occupied with other stuffs 😔.

    Anyways, keeps the spirits HIGH.


    Thanks and Regards,
    Mayank Shukla.😁
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register