01-14-2012, 08:37 AM
(This post was last modified: 01-14-2012, 08:38 AM by AceInfinity.)
Wow, woke up and re-read this... For one, the way i've done it above doesn't even specify Arr as a pointer... What a dumb mistake that was. I still need to find a way to define a full const of pointer type char though, to be used.
Problem I can't wrap my head around is the fact that dereferencing the char pointer will automatically call it to not accept a char string, and while it's dereferenced I can't change it's value because it's like trying to change the const char * variable directly, which is prohibited because of it's const property. While if I try to call it's address, I can't add onto the variable because i'm dealing with memory addresses, and not it's base value, therefore I can't add anything to it to make it a char string because I would be adding onto the memory address which would be bad.
Edit: A bit farther but this is why I like using std:tring and I hate using character strings... I don't know why they can't just accept input from std:tring...
Problem I can't wrap my head around is the fact that dereferencing the char pointer will automatically call it to not accept a char string, and while it's dereferenced I can't change it's value because it's like trying to change the const char * variable directly, which is prohibited because of it's const property. While if I try to call it's address, I can't add onto the variable because i'm dealing with memory addresses, and not it's base value, therefore I can't add anything to it to make it a char string because I would be adding onto the memory address which would be bad.
Edit: A bit farther but this is why I like using std:tring and I hate using character strings... I don't know why they can't just accept input from std:tring...