Is the use of pointers a good or bad habit in programming?
Using pointers is a good habit in programming as long as it's meaningful. What I mean by meaningful is that you should not use pointers to normal variable when the situation doesn't arise or not required. Like whenever you want to call by reference to a subroutine (i.e passing alterable variable to subroutine so that it does not have to duplicate the data and saves memory at runtime), This pointer in C++ or in C whenever you are handling strings or arrays,files,structure members,etc, then you can use pointers. But it is not necessary to declare pointers to variable if it's just a simple program algorithm, for example, like addition of two numbers.Because if one compares the runtime complexity of the two Algorithms, one with pointers for addition and the other without pointers of addition, then the runtime complexity of both the algorithm will be almost near and the overall time complexities will be almost approximate. Hence it's good to use pointers when it's really required in the programming.
Bug: Sololearn notification is still showing number in the notification icon even i did mark as read
Izzy the iguana code coach
Finished python for beginners
Hi, hope you're doing good.Could someone please tell me why does the while loop not stop when I type in rock, paper or scissors?
C++ Question re stringstream
Why sometimes 0 is printed?