Search found 4 matches

by menghiot
Wed Aug 15, 2007 11:49 am
Forum: Volume 112 (11200-11299)
Topic: 11209 - Be Together Again and Forever
Replies: 9
Views: 3376

Any hint to solve this problem ?
by menghiot
Sat Jan 28, 2006 4:47 am
Forum: C++
Topic: need help for STL sort inside a class
Replies: 6
Views: 2676

:D Many thanks !
by menghiot
Fri Jan 27, 2006 1:18 pm
Forum: C++
Topic: need help for STL sort inside a class
Replies: 6
Views: 2676

Hi , I, actually, did all the methods which you mention, before I post the questions . what I tried to do is sorting array a with condition : s[a ] < s[a[j]] (i<j) , not a <a[j] , (i<j) .... if I declare a inner class like class gg{ public: class cmp{ public: bool operator()(int a, int b) { return s...
by menghiot
Thu Jan 26, 2006 12:09 pm
Forum: C++
Topic: need help for STL sort inside a class
Replies: 6
Views: 2676

need help for STL sort inside a class

Hi, i tried to sorting an array a, with a condition s[a ] <= s[a[j]] (i<j), s is given. Both a and s is contained inside a class. You can take a look at the sample source code. #include <iostream> #include <vector> #include <algorithm> using namespace std; class gg{ public: bool cmp( int a, int b) {...

Go to advanced search