I have been teaching myself C and C++ and am somewhat familiar with pointers. My main question is Does const char* actually store a memory address? This question arose when working with strings. How can you assign a string to what is supposed to hold a memory address?
#include <iostream>
int main(void) {
const char* x = "Hello";
std::cout << x << std::endl; // Returns Hello
std::cout << &x << std::endl; // Returns the actual address
}
To my knowledge the above code should print a memory address, so what actually is a char*?