Since C++ pointers can access anything on the heap, I am scared that while using them they might corrupt my other programs and destroy other IMPORTANT processes. Is there any IDE that lets me do so safely? Also, is the stack safe?
4/12/2019 7:56:39 AM
I'm a Squirrel13 Answers
New AnswerSticking to a higher language to overcome fear of pointers is like sticking to the countryside to overcome fear of water.
Have you looked into smart pointers? https://stackoverflow.com/questions/106508/what-is-a-smart-pointer-and-when-should-i-use-one
I'm A Squirrel, they can take away the problems coming with having to free the memory, forgetting to nullify, or accidentally using a dangling pointer to point to a random location. You just have to require the memory which is the simple part. So i actually think they should mitigate your problems quite a bit!
C++ are interesting. IDEs - safe. Learn Javascript., Python & Java to get rid of your fear. 😑
Asim Farheen I agree they will eventually lead you to learn lower level languages as you get to more advanced concepts.
Try to return more than one value from your functions , create something like stacks and queues , or make something look like a dynamic arrays to figure out one of the power of pointer
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message