Click here to Skip to main content
15,914,481 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: char data type Pin
Maxwell Chen17-Aug-07 9:47
Maxwell Chen17-Aug-07 9:47 
AnswerRe: char data type Pin
Hamid_RT18-Aug-07 2:17
Hamid_RT18-Aug-07 2:17 
QuestionI have some linking problems Pin
bouli17-Aug-07 7:21
bouli17-Aug-07 7:21 
AnswerRe: I have some linking problems Pin
Emilio Garavaglia17-Aug-07 7:47
Emilio Garavaglia17-Aug-07 7:47 
QuestionOverloading the () operator Pin
Yadrif17-Aug-07 5:32
Yadrif17-Aug-07 5:32 
AnswerRe: Overloading the () operator Pin
Mark Salsbery17-Aug-07 5:47
Mark Salsbery17-Aug-07 5:47 
GeneralRe: Overloading the () operator Pin
Emilio Garavaglia17-Aug-07 6:23
Emilio Garavaglia17-Aug-07 6:23 
GeneralRe: Overloading the () operator Pin
Mark Salsbery17-Aug-07 6:36
Mark Salsbery17-Aug-07 6:36 
No irony and certainly not anywhere close to the amount of arrogance that seems to
be in your post.  Are you the posting police?

Actually I was agreeing with the OP.

I rarely see use of this that doesn't make the code harder to read than it would
be if a meaningful-named method was used.

Every time this comes up (function call operator) I'm reminded how lame the
example is in the Visual C++ documentation:
"Given an appropriate overloaded function-call operator, however, this syntax 
can be used to offset the x coordinate 3 units and the y 
coordinate 2 units. The following code shows such a definition:"

<pre>// function_call.cpp
class Point
{
public:
    Point() { _x = _y = 0; }
    Point &operator()( int dx, int dy )
        { _x += dx; _y += dy; return *this; }
private:
    int _x, _y;
};

int main()
{
   Point pt;
   pt( 3, 2 );
}

Cheers,
Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Overloading the () operator Pin
Nemanja Trifunovic17-Aug-07 7:07
Nemanja Trifunovic17-Aug-07 7:07 
GeneralRe: Overloading the () operator Pin
Mark Salsbery17-Aug-07 7:15
Mark Salsbery17-Aug-07 7:15 
GeneralRe: Overloading the () operator Pin
Nemanja Trifunovic17-Aug-07 7:49
Nemanja Trifunovic17-Aug-07 7:49 
GeneralRe: Overloading the () operator Pin
Mark Salsbery17-Aug-07 7:55
Mark Salsbery17-Aug-07 7:55 
GeneralRe: Overloading the () operator Pin
Emilio Garavaglia17-Aug-07 7:39
Emilio Garavaglia17-Aug-07 7:39 
GeneralRe: Overloading the () operator Pin
Mark Salsbery17-Aug-07 8:16
Mark Salsbery17-Aug-07 8:16 
GeneralRe: Overloading the () operator Pin
Hans Dietrich17-Aug-07 8:20
mentorHans Dietrich17-Aug-07 8:20 
GeneralRe: Overloading the () operator Pin
Mark Salsbery17-Aug-07 8:34
Mark Salsbery17-Aug-07 8:34 
GeneralRe: Overloading the () operator Pin
Hans Dietrich17-Aug-07 8:56
mentorHans Dietrich17-Aug-07 8:56 
GeneralRe: Overloading the () operator Pin
led mike17-Aug-07 6:46
led mike17-Aug-07 6:46 
GeneralRe: Overloading the () operator Pin
Emilio Garavaglia17-Aug-07 7:20
Emilio Garavaglia17-Aug-07 7:20 
AnswerRe: Overloading the () operator Pin
Nemanja Trifunovic17-Aug-07 6:15
Nemanja Trifunovic17-Aug-07 6:15 
GeneralRe: Overloading the () operator Pin
Yadrif17-Aug-07 8:35
Yadrif17-Aug-07 8:35 
QuestionHandle click on Statusbar Pin
baerten17-Aug-07 4:31
baerten17-Aug-07 4:31 
AnswerRe: Handle click on Statusbar Pin
Emilio Garavaglia17-Aug-07 6:31
Emilio Garavaglia17-Aug-07 6:31 
AnswerRe: Handle click on Statusbar Pin
Hans Dietrich17-Aug-07 8:27
mentorHans Dietrich17-Aug-07 8:27 
QuestionCreating ODBC Driver ( Link and good article Needed ) Pin
ashukasama17-Aug-07 4:07
ashukasama17-Aug-07 4: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.