| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
Char pinter in c++
|
Original Message
|
Name: ismar
Date: December 5, 2005 at 11:11:35 Pacific
Subject: Char pinter in c++OS: Windows xpCPU/Ram: 2 GB |
Comment: I have some questions about char-pointers in c++. I have made a image of what i THINK is happening when i write char c[] = "hello"; char* c2= c;
and char c = "hello"; char* c2= c; Is this image correct? How can adress of "c" be the same as c[0] and c in the first image?
And why is "c2" pointing to "c[0]" and not to "c" in the last image?
Report Offensive Message For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home