Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > HOWTO: const and pointer variants in C and C++

Reply
Thread Tools

HOWTO: const and pointer variants in C and C++

 
 
Old Wolf
Guest
Posts: n/a
 
      11-12-2008
On Nov 11, 11:19*pm, "Adem" <for-usenet...@alicewho.com> wrote:
> * * const *int* * * * p3 = &c; *// p3 is a non-const ptr to const data


Not exactly, e.g. :
const int *p3 = &n; // not error


Also, you omitted:
int const *p
int const *const p
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
const pointer versus const content pointed to by pointer Disc Magnet C Programming 1 05-06-2010 10:27 AM
HOWTO: const and pointer variants in C and C++ Adem C Programming 10 11-12-2008 10:02 PM
const vector<A> vs vector<const A> vs const vector<const A> Javier C++ 2 09-04-2007 08:46 PM
Smart Pointer release() const : it can set the pointer to null with the keyword "const"? coala C++ 1 09-06-2006 03:00 PM
Smart Pointer release() const : it can set the pointer to null with the keyword "const"? coala C++ 3 09-06-2006 02:58 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57