![]() ![]() I promise to use it as a bad example only. The code is written in C, but an equivalent code can be written in C++ using new, delete, cin & cout. I can hear you shouting “Bad code”. Lets consider the below code which read and print n numbers using pointers: // Memory leaks. And rightfully so, A pointer wrongly handled can be catastrophic. Those who use languages like C and C++ that support user defined pointer variables, put utmost emphasis on implementing the pointers correctly.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |