I'd like to know the address that Const char* points to.

Asked 2 years ago, Updated 2 years ago, 43 views

I want to know where 'h' is stored in the const char* name = "hello"; Only strings were printed continuously with &*name.

string

2022-09-22 18:37

1 Answers

   static_cast<const void*>(&*name) 

I was able to confirm that.


2022-09-22 18:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.