pointers | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

pointers

Normally in C++ (as my understanding), a pointer is a integer variable to store an address.. But we write .. #include <iostream> using namespace std; void LOG (const char* message){ cout << message << endl; } int main() { LOG ("Hello World!"); } how this is possible (assigning string value to a pointer)?

6th Jun 2020, 2:17 PM
Kumudu_Mohottala
Kumudu_Mohottala - avatar
1 Answer
+ 2
rudolph flash, Martin Taylor my problem is value is assigned without any dereference.. am I wrong?
6th Jun 2020, 3:12 PM
Kumudu_Mohottala
Kumudu_Mohottala - avatar