I'm not sure what are you trying to do here... You're providing an array of string as a second argument (a copy actually) and then you're returning a single string and assigning it to a single element in that same array.
acc>>str; acc>>help; acc>>help; acc>>help; acc>>help; acc>>help;
Why are you overriding help 4 times?
In the first version you have for(i=0;i<=5;i++) acc>>IDs[i]; which means the data is input to IDs[0] to IDs[5] while you're returning IDs[6].
Im trying to read some values from a file by function and return it as string array
that help I have there cause values I want from file arent at the beginning of the value but after some other values
IDs[6] is IDs[0] to IDs[5]
so in the second code I put their values to itm[6] like this:
itm[1]=ID[0]...itm[6]=ID[5]
and its still causing errors
EDIT: What have I wrong in that second??
EDIT: Hmm seems I have there mistake Im trying to return arrray of strings to array of strings :D
No you're not, you're returning a single string - itm[6], the last value of itm array. Why do you even need IDs ? You can read it directly do the itm array.