Cannot read string from a file!
Please help me in here.
I have a file in which are written numbers and strings, like this:
12 MJ
5 SK
11 JO
2 RE
So i need to put the numbers (only the numbers!) in one array, and the strings in another one, coz the number of the numbers and the strings is equal.
I tried several ways but it doesn't work - i got only 1 0 1 0 1 0 1 0, in another way 1 (null) 1 (null) 1 (null)... and in some way just some 1 and one small number (-12309343) and segmentation fault error.
What is the problem? I realy can't figure it out. If you have any ideas about this, please help me.
Thank you.