Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
~10.4K People Reached
Favorite Forums
Favorite Tags
c++ x 219
Member Avatar for nurulshidanoni

Dear all, I have this code and this data...but i want to sort the sum1 in descending order..but my problem is..i want to sort many array....like this.. after sort 3: ............. 46 1: .............. 25 2:..................20 how to sort in descending order together with the row? 1: 5 6 7 …

Member Avatar for nurulshidanoni
0
114
Member Avatar for nurulshidanoni

I have x and y array...After I have sort y, it succefully sort the y. but for x, there is some number that are not sort like this [B][U]x y[/U][/B]30 1 45 1 46 1 15 1 I want the x sorting also...like this [B][U]x y[/U][/B]30 1 15 1 30 …

Member Avatar for VernonDozier
0
114
Member Avatar for nurulshidanoni

this is the sample program of selection sort, which is given the value. But, how to call the value from read file? anybody knows? [ICODE] #include <iostream> using namespace std; void selectionSort(int *y,int n)//selection sort function { int i,j,min,minat; for(i=0;i<n;i++) { minat=i; min=y[i]; for(j=i+1;j<(n);j++) //select the min of the rest …

Member Avatar for Arpy Giri
0
167
Member Avatar for nurulshidanoni

Why the selection sort output not appear? Anybody knows how to correct it? [CODE=C++] #include < iostream > #include < string > #include < cmath > #include < iomanip > #include < fstream > using namespace std; void SelectionSort ( int *y , int n )//selection sort function { int …

Member Avatar for nurulshidanoni
0
138
Member Avatar for nurulshidanoni

After read this file , i want to do a selection sort...below are the selection sort programming that i get from google [CODE=C++] #include <fstream> #include <string> #include <iomanip> #include <iostream> using namespace std; void sortData( string fId[], int noOfRows); int main () { string Id[100]; int total[100], i = …

Member Avatar for nurulshidanoni
0
3K
Member Avatar for nurulshidanoni

why the output do not produce the output after sorting....anybody knows how to do a selection sort code? [code=C++] #include <iostream> #include <string> #include <cmath> #include <iomanip> #include <fstream> using namespace std; void selectionSort(int *y,int n)//selection sort function { int i, min,minat ; { for(i=0;i<3;i++) { minat=i; min=y[i]; if(min<y[i]) { …

0
44
Member Avatar for nurulshidanoni

I have this data, but when i sort it different from what i want. I want to sort in descending order like this 2 30 1 20 3 15 [U][B]jest.txt[/B][/U] 1 20 2 30 3 15 [U][B]after compile[/B][/U] 1 15 30 15 15 15 [code=C++] #include <fstream> #include <string> #include …

Member Avatar for nurulshidanoni
0
80
Member Avatar for nurulshidanoni

How to do a selection sort? Which I want to sort in descending order this data 1 50 2 90 3 40

Member Avatar for Laiq Ahmed
0
86
Member Avatar for nurulshidanoni

How to declare the array and read the array? Must I use data structure? [U]Two array[/U] 1 30 2 20 3 10 4 50 5 15

Member Avatar for nurulshidanoni
0
100
Member Avatar for nurulshidanoni

How to change this data sturucture from vector <int> total; to float total;? because if I change it to float teher is many error.... [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace std; // import …

Member Avatar for littlestone
0
280
Member Avatar for nurulshidanoni

i have this data..but how to sort the data in descending order together with the examid? [U]examid total[/U] 1: 25 2: 20 3: 46 4: 56 5: 12 6: 22 7: 20 8: 18

Member Avatar for localp
0
149
Member Avatar for nurulshidanoni

what is the =' : left operand must be l-value means? error C2106: '=' : left operand must be l-value [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace std; // import "std" namespace into global …

Member Avatar for nurulshidanoni
0
433
Member Avatar for nurulshidanoni

Can anybody help me whis this error? in red colour... error C2109: subscript requires array or pointer type error C2109: subscript requires array or pointer type : error C2109: subscript requires array or pointer type error C2664: 'void __cdecl std::swap(int &,int &)' : cannot convert parameter 1 from 'int' to …

Member Avatar for Agni
0
931
Member Avatar for nurulshidanoni

I have this programming but I want to sort the total in descending order... How to make an examid together with total after has sort the output? [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace …

0
58
Member Avatar for nurulshidanoni

If i have 2 array contains data 1 50 2 30 3 40 4 70 if I want to sort in descending order which take nombor and data together... 4 70 1 50 3 40 2 30 How???

Member Avatar for nurulshidanoni
0
84
Member Avatar for nurulshidanoni

I have this data..but something error..my data is like this... Exam TExam 1 25 2 20 3 46 4 56 5 12 but it only appear like this 1: -853617 [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for …

Member Avatar for nurulshidanoni
0
110
Member Avatar for nurulshidanoni

If I want to sort in descending order for exams.at (i).total.at(j) like this.. the output 1 34 2 56 3 21 and I want to cout the output 2 56 1 34 3 21 Is it must to use bubble sort or radix sort? [code=c++] #include <iostream> // std::cout #include …

Member Avatar for mitrmkar
0
603
Member Avatar for nurulshidanoni

AYBODY KNOWS WHY THIS PROGRAM IS ABNORMAL? [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace std; // import "std" namespace into global namespace struct exam { string examid; vector <int> total; }; int myfile; int …

Member Avatar for Ancient Dragon
0
110
Member Avatar for nurulshidanoni

[B]exam TStu TExam [/B] 1 91 25 2 168 20 3 2080 46 4 680 56 5 15 12 6 680 22 7 166 20 How to sort in descending order like this.. 4 680 56 3 2080 46 1 91 25 ....................................

Member Avatar for Ancient Dragon
0
110
Member Avatar for nurulshidanoni

I have this to file.First [B][U]ayam.txt[/U][/B] 10 20 30 60 90 50 40 [U][B]and itik.txt[/B][/U] a b c d e f g h i How to call read and write the ayam.txt and itik.txt into one file. which first i would like to cout the ayam.txt and then itik.txt.

Member Avatar for scarface3288
0
143
Member Avatar for nurulshidanoni

I have this data 1 2 3 4 5 6 7 8 9 10 0 1 0 9 0 0 5 0 0 3 How to count rowwhich have value only? Which the answers is only 4 column which have value? something like this I do. [code=C++] a[i]=total; total=a[i]+temp; myfile<<"\t"<<total<<setw(5); …

Member Avatar for Laiq Ahmed
0
188
Member Avatar for nurulshidanoni

I cannot compile my programming..abnormal programming..anybody whi knows where is my mistake? [code=C++] { int count, k; { count=0; myfile<<"i,j|"; for ( int i = 1 ; i < students.size (); i++ ) for ( int k = 1;k<students.at(i).examcode.size(); k++ ) { count=0; for (int colHead = 1; colHead <students.at …

Member Avatar for nurulshidanoni
0
129
Member Avatar for nurulshidanoni

How to count> Is true I do this programming? [code=C++] { int count; count=0; count++; for ( int i = 0 ; i < students.size (); i++ ) { for ( int k = 0;k<students.at(i).examcode.size(); k++ ) { if (students.at (i).examcode.at(0)=0) { cout<<count++<< " "; } } } } [/code]

Member Avatar for hammerhead
0
146
Member Avatar for nurulshidanoni
Member Avatar for nurulshidanoni

How to count how many (3, 10 appears in data? I have done a little bit programming but abnormal program. (3 , 10) (3 , 31) (3 , 51) (3 , 71) (3 , 78) (3 , 97) (3 , 105) (3 , 113) (3 , 135) (3 , 138) …

Member Avatar for nurulshidanoni
0
84
Member Avatar for nurulshidanoni

File is successfully opened 3 13 34 54 71 81 97 105 116 135 138 I have this data, and I want to call (3,1) then (3,13), then (3,34).......... How to declare 3 is the first than 13 is second? [code=C++] { ifstream stream1 ("STA83STU.txt"); if ( !stream1 ) { …

Member Avatar for WaltP
0
81
Member Avatar for nurulshidanoni

How to make a pair programming.. like I have 1 2 3 4 5 6 7 First, I want to make a pair of 91,20 (1,3) (1,4) (1,5) using i=1, i<9,i++

Member Avatar for nurulshidanoni
0
255
Member Avatar for nurulshidanoni

I have this data ROW 1: 3 15 36 56 71 83 97 106 118 135 138 ROW 2: 3 10 31 51 71 78 97 105 113 135 138 How to count when 3 meet 15 is 1 3 meet 36 is 1 3 56 is 1 3 meet …

Member Avatar for nurulshidanoni
0
226
Member Avatar for nurulshidanoni

Dear all, I have one problem,..I want to count how many examcode and fill in the blank in the matrix below that I have done. Example is ,, for examcode 1 how many it appear. and for examcode 2 and examcode 1, how many student take both of them?? [code=C++] …

Member Avatar for nurulshidanoni
0
351
Member Avatar for nurulshidanoni

How to correct it , at line 84. Error executing cl.exe. error C2447: missing function header (old-style formal list?) [code=C++] /*--------------------------- Filename : ConflictMatrix.cpp ---------------------------*/ #include <iostream> #include <fstream> #include <iomanip> #include <string> #include <vector> using namespace std; struct student { string studentid; vector <int> examcode; }; int main() { …

Member Avatar for nurulshidanoni
0
120