I know my code is VERY sloppy, but my objective is to read in a .txt file of shuffled words, store it into a string array and alphabetically sort the string array then output the sorted array into a different .txt file. My trouble is that I'm unable actually store the words in the .txt file into the array. I tried a for loop, using "myfile >> intArray[i];" but that didn't work.
I wasn't exactly sure how line 9, 19, or 20 worked, but I added those in place of removing myfile >> intArray[i]; since that didn't work for me earlier.
Alright thanks! Also I've seem to find the source of my problems... Compiling my program on Visual Studios will run successfully, provided that I change the stack limit in the settings (My original problem required an array size greater than 200k). But I'm using Atom and MinGW which for some reason doesn't allow me to store the text file into a string array. But I could do so with Visual Studios.