Yes I'm reading integer type of files. If you going to write with comments its gonna be much better for me. And could you show me other way with dynamic arrays? Thank you!
Just count the spaces in the entire line (str contains 1 line). This can be used to determine the number of "items" you must read in to the array. Also so you can create it dynamically. You could alternatively read in the line twice, the first time counting and the second time adding to the array. There may be a better solution but I can't really think of one.
I've got:
1000 4 // 1000 means money, 4 means rows
and there is the prices in the shelfs:
3 15 360 8
5 2 1 145 99 300
4 700 600 900 800
2 8 1
And here I'm stick, coz I don't know how to read columns without exact number of columns
Like I said earlier you could either read in each row twice first time counting second time doing something with it or you could count the number of spaces. Kind of how you would count the number of words in a sentence.