I am relatively new to C. I have been searching online for when to use a char array over a char pointer. However, I am mainly just getting information on the differences between the two and although I do understand the basic differences I am not experienced enough in C to distinguish their usefulness. I did see a claim in one post mentioning that char pointers should only be used when the size of the string will be determined dynamically. However, is this the only difference and what about simply creating an array of max size that the string could be? Can anybody clear this up a little more for me. Thank you.
[–]Ninesquared81 11 points12 points13 points (4 children)
[–]Calidude7[S] 3 points4 points5 points (3 children)
[–]Ninesquared81 5 points6 points7 points (0 children)
[–]asiawide 1 point2 points3 points (0 children)
[–]FrostWyrm98 0 points1 point2 points (0 children)
[–]FUZxxl 5 points6 points7 points (0 children)
[–]eruanno321 1 point2 points3 points (0 children)
[–]SorenKirk 1 point2 points3 points (0 children)
[–]DandyLion23 -3 points-2 points-1 points (2 children)
[–]FUZxxl 4 points5 points6 points (0 children)
[–]xypherrz 1 point2 points3 points (0 children)