|
1. the code shown here calls a member function in the class T which has no parameters and which returns a variable or type R.
2. as said formerly, the function accepts no parameters.
3. it is certainly useful to have such a function, even though it gets no parameters. the point is that is calls such a function in the class T; that means, every class used MUST have such a function existing, but also it means that every class used so defines its own behavior.
|
|
|
|
|
Thanks toxcct,
1. I do not quite catch your points, why a class must implement a function without any parameters?
<blockquote class="FQ"><div class="FQA">toxcct wrote:</div>that means, every class used MUST have such a function existing, but also it means that every class used so defines its own behavior. </blockquote>
2. I want to confirm that, the declaration of variable pmf could be pointed to any member functions of class (type) T which returns type R and no input parameters? Right?
R (T::*pmf)()
regards,
George
|
|
|
|
|
George_George wrote: 1. I do not quite catch your points, why a class must implement a function without any parameters?
because it does something which doesn't need any further inputs from the caller.
here, the function is used as a functor, that means it is called internally from the STL algorithm you're using, to do a certain action on your class, but the algorithm wouldn't know what to pass it if it had to anyway.
George_George wrote: 2. I want to confirm that, the declaration of variable pmf could be pointed to any member functions of class (type) T which returns type R and no input parameters?
exactly. so, I think the compiler would probably complain (to be verified though) if it canoot determine which function to call if it find more than one.
|
|
|
|
|
Hi toxcct,
Your below description is not true. See my sample and it could compile ok.
toxcct wrote: exactly. so, I think the compiler would probably complain (to be verified though) if it canoot determine which function to call if it find more than one.
class Foo
{
public:
int Foo1() {};
int Foo2() {};
};
class Goo
{
public:
int (Foo::*pmf)();
};
int main()
{
return 0;
}
regards,
George
|
|
|
|
|
I SAID "I think" and "probably" which denotes a not sure at all. so give me my 5 back, dork
|
|
|
|
|
|
|
Done!
regards,
George
|
|
|
|
|
Why you delete your reply?
|
|
|
|
|
because i asked him to. it was a double post.
|
|
|
|
|
Ok but a question did you get notify when someone answer to your reply? I dont know it depends to these changes or no?
|
|
|
|
|
Chris announced it was disabled for some days, but now yes, I do.
|
|
|
|
|
Hi,
Can anybody please tell me the windows messages to capture the events minimize and restore for a dialog based application.
Thanks.
Kishore
|
|
|
|
|
Do you need to SW_MAXIMIZE and SW_MINIMIZE?
|
|
|
|
|
are you asking for WM_MINIMIZE?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
WM_SYSCOMMAND wParam : SC_MINIMIZE SC_RESTORE
|
|
|
|
|
I need to create an MFC application that shows the thumbnails reading them from thumbs.db file created by windows OS. Any help would be appricated.
Note: I am able to read the catalog header of the thumbs.db which contains information about no. of thumbnails and their dimesion. The problem is to read the filenames and the actual RGB data.
|
|
|
|
|
Here[^] a code for read thumbs.db but its with C#.
|
|
|
|
|
Hi all ia am working on a com component ... prviouly i was using
UseConnection ( struct _FrameworkConnection * DBConnection )
but now i want to use I Dispatch insted of using framework...
UseConnection ( IDispatch * DBConnection ) {
but it seems something is going wrong can anybody help me ?
T@SU
|
|
|
|
|
Hello friends!
I wanna to display the baloon tooltip in my application.
But the problem is with the ShellApi.h header file which is not
having the defination of the szInfo and other constants like NIF_INFO.
I've tried the things like defining constants like
#define _WIN32_IE 0x0500
#define _WIN32_IE 0x0600
as suggested in some advises but this doesn't solve the problem.
Can anyone pls tell me what should be done exactly to achive this task?
Many Thanks in advance.
ritz1234
|
|
|
|
|
|
Hi,
Thanks for the reply.
I am using Visual studio 6.0.
And I don't know which compiler it is using.
Is the problem relate to the compiler?
Can you exaclty point out what is the problem?
Thanks,
ritz1234
|
|
|
|
|
I'm using VS2005 and didnt get this problem.
|
|
|
|
|
Using the res protocol to access an HTML inside the resources it works just fine with images but not with flash files. What am i doing wrong ?
<BODY background="HTML_RES/tile.gif"> ---> this works
but the following does not.
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=300 HEIGHT=200 name="myMovie" id="myMovie"><br />
<EMBED src="HTML_RES/clock.swf" quality=high bgcolor=#FFFFFF WIDTH=576 HEIGHT=384 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" NAME="myMovie" id="myMovie"><br />
</EMBED><br />
</OBJECT>
Does the Res:// protocol support flash objects inside resources?
Regards,
sdancer75
|
|
|
|
|
Hello everybody,
i want to create a shortcut (.lnk) to a DOS application.
There are many samples at CodeProject, but i need to set the initial size to a specific value.
On a "exe".lnk the user has the possibility to set the window size for this kind of window or only
for this "session of the window"
But i like to set these values in C++, so that the user don't need to set this value on his own.
Big thanks
|
|
|
|