If the file will not open it is usually because of an incorrect path. That is, the file is in one directory, but the program is looking in another. It may depend on how you are running the program, usually it will be the same as the executable program *.exe on windows, which could be in a subfolder.
If you are using windows, you can find out like this:
Sorting the numbers changes the contents of the array. If you want the original unsorted order, you need to make a copy of the array and sort the copy, not the original.
@ chervil can you give an example to go by don't do it for me I'm just learn better by seeing. thank you for helping me I really do appreciate it I have looked everywhere on the internet for videos and stuff and have found really great stuff but nothing this specific I'm taking this course online and its really kicking my butt but I had no choice since they don't offer the actual class at my college I'm going through a sister college.
Note: you should probably have a duplicate array to keep the unsorted values in case the user enters 2 or 3 and then enters 1. Alternatively, you could simply re-read the file.
If you were to use a duplicate array, simply define a second array, something like this:
info infodup[10];
Then after reading from the file, use a loop to copy each element from the existing array to the duplicate array
infodup[i] = infoentry[i];
Finally, change the code for option 1 in the user selection to use array infodup instead of infoentry
C:\Users\April\Documents\PROG03.cpp:48:17: error: 'i' was not declared in this scope
C:\Users\April\Documents\PROG03.cpp:64:23: warning: name lookup of 'infodup' changed [enabled by default]
C:\Users\April\Documents\PROG03.cpp:17:3: warning: matches this 'infodup' under ISO standard rules [enabled by default]
C:\Users\April\Documents\PROG03.cpp:46:11: warning: matches this 'infodup' under old rules [enabled by default]
You have examples of for loops in your own code which use either i or j as the loop counter.
(where you sort the array). Those should give you some idea of how to start.
yea I know after I posted that I'm like am I really that stupid lol! this is what I got it will run but nothing will happen for option 1 when you choose it
Sorry about this - it's always a balancing act when trying to help, too little and it's no help at all, too much and it is also no help at all. I know I tend mostly towards the "too little" side of things, sorry it didn't help here.
its not your fault I'm just so upset because I'm paying my own money for this course and there is not enough info I have no book just a few pages over the assignment is what I get. I have to figure it on my basically my teacher is very kind and tryies to help but I would be better off learning this in a classroom enviorment.