Click here to Skip to main content
15,909,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: std::sort( Ran first, Ran last, Cmp cmp) Pin
Maxwell Chen9-May-04 20:20
Maxwell Chen9-May-04 20:20 
 Mil10 wrote:
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.

From Section 11.5 in "The C++ Programming Language, 3rd":

An ordinary member function declaration specifies three logically distinct things:
(1) The function can access the private part of the class declaration, and
(2) the function is in the scope of the class, and
(3) the function must be invoked on an object (has a this pointer).

By declaraing a member function static ($10.2.4), we can give it the first two properties only. By declaring a function a friend, we can give it the first property only.



Maxwell Chen
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 
GeneralRe: SetFocus for a chosen Edit Control in MFC Pin
robert_s9-May-04 12:07
robert_s9-May-04 12:07 

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.