|
|
Here i have a code that works wrong! But i can't understand what's wrong. |
Analyzing: wave0.txt 0, 0, 122, Event: 0 1, 0, 135, 2, 0, 148, 3, 0, 156, 4, 1, 178, Event: 1 5, 1, 189, 6, 1, 256, 7, 1, 114, 8, 2, 125, Event: 2 9, 2, 136, 10, 2, 630, 11, 2, 360, 12, 3, 111, Event: 3 Event size: 4 Event [1], sample[1]: Event [3], sample[1]: 360 |
Event:0 0,0,122 1,0,135 2,0,148 3,0,156 Event:1 5,1,178 6,1,189 7,1,256 8,1,114 Event:2 9,2,125 10,2,136 11,2,630 12,2,360 Event size: 4 |
|
|
Event: 0 1,0,122 2,0,135 3,0,148 4,0,156 Event: 1 5,1,178 6,1,189 7,1,256 8,1,114 Event: 2 9,2,125 10,2,136 11,2,630 12,2,360 |
cout << counter << ", " << index << ", " <<str << ", "<< endl;
cout<<"Event: "<<index<<endl;
|
|
while( input.getline(str, 255) ) {
|
|
Event: 0 1,0,122 2,0,135 3,0,148 4,0,156 Event: 1 5,1,178 6,1,189 7,1,256 8,1,114 Event: 2 9,2,125 10,2,136 11,2,630 12,2,360 all is : 178 |
cout<<all[1].data[5]<<endl;
for n=0 and j=4 the code show us 178 whereas value of 178 is for n=1 not n=0 and so on. |
..... Event: 1 5,1,178 ..... |
cout << counter << ", " << index << ", " <<str << ", "<< endl;