Hi,
plz can u help me i want to sort my file (sort the second column) and i don't find any solution
do u have some idea for me plz!!
my file :

1176890540542339	1	102	2005	4	
1176890540575285	0	103	2005	4	
1176890540575285	1	103	2005	4	
1176890540608694	0	104	2005	4	
1176890540608694	1	104	2005	4	
1176890540642060	2	105	2005	4	
1176890540642060	1	105	2005	4	
1176890540675324	0	106	2005	4	
1176890540675324	1	106	2005	4	
1176890540708717	0	107	2005	4	
1176890540708717	1	107	2005	4	
1176890540742076	0	108	2005	4	
1176890540742076	1	108	2005	4	
1176890540775255	0	109	2005	4	
1176890540775255	1	109	2005	4	
1176890540809319	2	110	2005	4	
1176890540809319	1	110	2005	4	
1176890540842035	0	111	2005	4
1176890540842035	1	111	2005	4	
1176890540875209	0	112	2005	4
1176890540875209	1	112	2005	4
1176890540908657	0	113	2005	4
1176890540908657	1	113	2005	4
1176890540941975	0	114	2005	4
1176890540941975	1	114	2005	4
1176890540975419	0	115	2005	4
1176890540975419	1	115	2005	4
1176890541008587	0	116	2005	4
1176890541008587	1	116	2005	4
1176890541042025	0	117	2005	4
1176890541042025	1	117	2005	4
1176890541075343	2	118	2005	4
1176890541075343	1	118	2005	4
1176890541109699	0	119	2005	4
1176890541109699	1	119	2005	4
1176890541142079	0	120	2005	4
1176890541142079	1	120	2005	4

and iwant my file like this after Sort():

1176890540542339	0	102	2005	4	
1176890540575285	0	103	2005	4	
1176890540575285	0	103	2005	4	
1176890540608694	0	104	2005	4	
1176890540608694	0	104	2005	4	
1176890540642060	0	105	2005	4	
1176890540642060	0	105	2005	4	
1176890540675324	0	106	2005	4	
1176890540675324	0	106	2005	4	
1176890540708717	0	107	2005	4	
1176890540708717	0	107	2005	4	
1176890540742076	0	108	2005	4	
1176890540742076	0	108	2005	4	
1176890540775255	0	109	2005	4	
1176890540775255	0	109	2005	4	
1176890540809319	0	110	2005	4	
1176890540809319	0	110	2005	4	
1176890540842035	1	111	2005	4
1176890540842035	1	111	2005	4	
1176890540875209	1	112	2005	4
1176890540875209	1	112	2005	4
1176890540908657	1	113	2005	4
1176890540908657	1	113	2005	4
1176890540941975	1	114	2005	4
1176890540941975	1	114	2005	4
1176890540975419	1	115	2005	4
1176890540975419	1	115	2005	4
1176890541008587	1	116	2005	4
1176890541008587	1	116	2005	4
1176890541042025	1	117	2005	4
1176890541042025	1	117	2005	4
1176890541075343	1	118	2005	4
1176890541075343	2	118	2005	4
1176890541109699	2	119	2005	4
1176890541109699	2	119	2005	4
1176890541142079	2	120	2005	4
1176890541142079	2	120	2005	4

THX

i have a Class Cline to get Time (16 first char) and number (number in second column).
exemple to get number of second column i do that :

ifstream file("file.txt");
string line;
while(getline(file,line))
{
Cline Temp(line);
vector <Cline>v1;
v1.puch_back(Temp);
for(int i=0;i<v1.size();i++)
int number = v1.at(i).getNumber  // to get number in second column "0,1,2..."                                                              //and I want to sort my file with these numbers. 

}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.