Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
C++ char array strings memory leak?
when i do this
char* string = "hello";
should i first do this?
before i do this?
string = "a diffrent hello";
when i call delete string i get some kind of error though.
i wonder where is data allocated when i write the char array string or whatever its called "hello" is it heap or stack?
thanks for any help im curious.