A question on member functions when using lambda expression. Can anyone with kindness help me?
I am using Dev-C++ with lambda expression and building a DLL. In Dev-C++, when the program is used as a exe.It works fine. But I want to make it a class (i.e.classA in the following)in a DLL for other exes to use it. And the error occured: In dll.cpp: ................ void classA::a() ......................... (while_loop(bind(&isprime,_1)==false, ++var(result))(middlevalue); ...................... where bool isprime(int) is also a member function of classA. But the complier told me that: ISO C++ forbids taking the address of an unqualified non-static member function to form a pointer to member function. I do not know how to solve it. Can anyone with kindness help me?
2009/7/19 fmingu
(while_loop(bind(&isprime,_1)==false, ++var(result))(middlevalue);
Try this: (while_loop(bind(&*A::*isprime,_1)==false, ++var(result))(middlevalue); Roman Perepelitsa.
participants (2)
-
fmingu
-
Roman Perepelitsa