By definition, if a program works as intended with pointers, they are not being misused. But, yes, the program could have been done without using pointer syntax. Given a choice of approaches...
Type: Posts; User: grumpy
By definition, if a program works as intended with pointers, they are not being misused. But, yes, the program could have been done without using pointer syntax. Given a choice of approaches...
That sort of rubbish (note that I didn't use an expletive, even though I consider it warranted) and lazy attitude is why so many memory leaks occur in production code. It's not a problem, until...
Still a memory leak.
One characteristic of your code is that it is working with arrays, but obscuring that behind pointer syntax. The code can probably made more readable by using array syntax....
1) To be blunt, it doesn't work because you coded it incorrectly, without understanding the difference between pointers and strings. The selectLower() function returns a pointer to the...