Quick case: Char Pointer vs Char Array in C++
When you write:
char strA[] = "Hexlo World!"; strA[2] = 'l'; Everything works as expected. But what about:
char *strP = "Hexlo World!"; strP[2] = 'l'; Do you think it will work correctly? If you are not sure, then I guess, you might be interested in the rest of article.
C++ Stories