Click here to Skip to main content
15,912,665 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Console window in Windows Pin
FirstPerson9-May-04 20:46
FirstPerson9-May-04 20:46 
GeneralRe: Console window in Windows Pin
Anthony_Yio10-May-04 1:09
Anthony_Yio10-May-04 1:09 
GeneralMain Window Icon loading Pin
robert_s9-May-04 13:18
robert_s9-May-04 13:18 
GeneralRe: Main Window Icon loading Pin
Iceberg769-May-04 15:22
Iceberg769-May-04 15:22 
GeneralRe: Main Window Icon loading Pin
_foo9-May-04 18:36
_foo9-May-04 18:36 
GeneralRe: Main Window Icon loading Pin
robert_s10-May-04 4:51
robert_s10-May-04 4:51 
Generalstd::sort( Ran first, Ran last, Cmp cmp) Pin
Laing,James9-May-04 11:17
Laing,James9-May-04 11:17 
GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Milton Karimbekallil9-May-04 19:31
Milton Karimbekallil9-May-04 19:31 
hi
Yes it is possible, provided the user-defined binary predicate function shud b static. Otherwise u know, while linking a class, every member function will get an _this pointer automatically. This changes the function signature of a predicate function and will show error while compilation. If it is static the parameter list will remain unchanged. c the sample class.

rgds..mil10

using namespace std;<br />
class TstClass<br />
{<br />
public:<br />
	vector<int> _data;<br />
	void loaddata()<br />
	{<br />
		_data.push_back(20);<br />
		_data.push_back(10);<br />
		_data.push_back(30);<br />
	}<br />
<br />
	static bool UDgreater ( int elem1, int elem2 )<br />
	{<br />
		return elem1 > elem2;<br />
	}<br />
<br />
	void displaysorted()<br />
	{<br />
		sort(v.begin(),v.end(),UDgreater);<br />
		vector<int>::iterator it;<br />
		<br />
		for( it=v.begin(); it!=v.end(); it++ )<br />
			cout<<(*it);		<br />
	}<br />
};

GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Maxwell Chen9-May-04 20:20
Maxwell Chen9-May-04 20:20 
GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Laing,James9-May-04 21:51
Laing,James9-May-04 21:51 
GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Milton Karimbekallil10-May-04 18:11
Milton Karimbekallil10-May-04 18:11 
GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Mike Dimmick10-May-04 1:43
Mike Dimmick10-May-04 1:43 
GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Paul Ranson10-May-04 4:14
Paul Ranson10-May-04 4:14 
GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Laing,James10-May-04 9:42
Laing,James10-May-04 9:42 
GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Laing,James10-May-04 9:58
Laing,James10-May-04 9:58 
GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Paul Ranson10-May-04 10:39
Paul Ranson10-May-04 10:39 
GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Laing,James11-May-04 9:35
Laing,James11-May-04 9:35 
GeneralDialogs Pin
Member 6226669-May-04 10:51
Member 6226669-May-04 10:51 
GeneralRe: Dialogs Pin
Christian Graus9-May-04 13:03
protectorChristian Graus9-May-04 13:03 
Generalsnapping windows Pin
Roman Nurik9-May-04 9:19
Roman Nurik9-May-04 9:19 
GeneralRe: snapping windows Pin
KalliMan9-May-04 10:24
KalliMan9-May-04 10:24 
GeneralRe: snapping windows Pin
Antony M Kancidrowski10-May-04 2:01
Antony M Kancidrowski10-May-04 2:01 
GeneralSetFocus for a chosen Edit Control in MFC Pin
robert_s9-May-04 9:01
robert_s9-May-04 9:01 
GeneralRe: SetFocus for a chosen Edit Control in MFC Pin
KalliMan9-May-04 10:15
KalliMan9-May-04 10:15 
GeneralRe: SetFocus for a chosen Edit Control in MFC Pin
toxcct9-May-04 10:23
toxcct9-May-04 10:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.