[Solved] Getting a segmentation error when printing my array of strings
[ad_1] The displayInOrder() function is expecting a pointer to an the whole array. Instead, you passed a pointer to cities[5]. This has two problems: It’s a pointer to a specific element, not the whole array. The last element of the array is cities[4], so you’re accessing outside the array bounds. You should call the function … Read more