multiple columns into one column

I have a text file with 100 columns in it. each column has 700 rows. Now I want to merge all columns into one column. like, after the last row of the 1st column 2nd column will start and all 100 columns will be arranged in a column. how to proceed to this??

So essentially you want to transform a grid layout into a list layout?
What do you want to be on each row of this one column ie are you splitting sentences up into words separated to new lines, or each character is in its own line?

After that the practice is simply scanning for what ever it is you're wanting to separate by and add a \n character to the start/end of it.
sorry!!! I could not get you. my data set is like this,
1 10 100
2 20 200
3 30 300
4 40 400
5 50 500
6 60 600

I need to arrange them in this format,
1
2
3
4
5
6
10
20
30
40
50
60
100
200
300
400
500
600

Right, that's sort of the complete opposite to what I thought but you pretty much do the same thing.

1
2
3
4
5
6
7
8
int input[sizeX][sizeY];
int output[sizeX * sizeY];
for(int i=0; i<sizeX; i++){
    for(int j=0; j<sizeY; j++){
        int temp = sizeX * j;
        output[temp + j] = input[j][i] //this isn't [i][j] because that would be row format
    }
}


I think this should work but I've not put an awful lot of thought into it so you might want to check it first XD
Topic archived. No new replies allowed.