I'm trying to load users from a .txt file. I do this in the first lines of main();
I did my self a check to see if the files are being loaded during the loop and they are, but the information isn't getting inside, like if he wouldnt be able to read the file.
so, I have only 1 file (0.txt) with my details like:
1 2 3 4 5
Sam
Something
Sam5513
myphonenumb
mymail
When the loop is initiated, it shows me "0.txt loaded to array slot 0.", but the lines above show "fname[0]=" and so on, meaning that there is nothing in the array slots and they are cleared out.
Chervil is right, if you open a file in main, it's not open for other functions.
Did you check to see if the file was open in your function ?
If not just move the open file statements.