Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCString::Find problem Pin
ForNow26-Jan-12 17:19
ForNow26-Jan-12 17:19 
AnswerRe: CString::Find problem Pin
Peter_in_278026-Jan-12 17:59
professionalPeter_in_278026-Jan-12 17:59 
GeneralRe: CString::Find problem Pin
ForNow26-Jan-12 19:26
ForNow26-Jan-12 19:26 
AnswerRe: CString::Find problem Pin
«_Superman_»26-Jan-12 18:56
professional«_Superman_»26-Jan-12 18:56 
QuestionMember to pointer as template argument Pin
LionAM25-Jan-12 10:44
LionAM25-Jan-12 10:44 
AnswerRe: Member to pointer as template argument Pin
Albert Holguin25-Jan-12 13:44
professionalAlbert Holguin25-Jan-12 13:44 
AnswerRe: Member to pointer as template argument Pin
«_Superman_»25-Jan-12 16:52
professional«_Superman_»25-Jan-12 16:52 
GeneralRe: Member to pointer as template argument Pin
LionAM25-Jan-12 23:02
LionAM25-Jan-12 23:02 
Thank you for your answers.
Please look at this example:
C++
struct TestObject
{
    int i;
};

template<int TestObject::*Member>
void test() {}

...

test<&TestObject::i>();

This way, I can call the function template so that the member pointer is passed as a (non-type) template argument. However, in my case, I would like that parent and type are template parameters, too:
C++
struct TestObject
{
    int i;
};

template<class Parent, typename Type, Type Parent::*Member>
void test() {}

...

test<Testobject, int, &TestObject::i>();

However, this is not very convenient to call test() as you have to specify all template arguments manually.
If you pass &TestObj::i as a argument to the function, Parent and Type are deduced - but not the Member...

Alex
GeneralRe: Member to pointer as template argument Pin
«_Superman_»26-Jan-12 3:03
professional«_Superman_»26-Jan-12 3:03 
Questionc++ win32, Trouble getting CreateThread and CreateProcess running together Pin
jkirkerx25-Jan-12 8:13
professionaljkirkerx25-Jan-12 8:13 
AnswerRe: c++ win32, Trouble getting CreateThread and CreateProcess running together Pin
Richard Andrew x6425-Jan-12 9:19
professionalRichard Andrew x6425-Jan-12 9:19 
GeneralRe: c++ win32, Trouble getting CreateThread and CreateProcess running together Pin
jkirkerx25-Jan-12 9:23
professionaljkirkerx25-Jan-12 9:23 
GeneralRe: c++ win32, Trouble getting CreateThread and CreateProcess running together Pin
Richard Andrew x6425-Jan-12 9:26
professionalRichard Andrew x6425-Jan-12 9:26 
GeneralRe: c++ win32, Trouble getting CreateThread and CreateProcess running together Pin
Richard Andrew x6425-Jan-12 9:34
professionalRichard Andrew x6425-Jan-12 9:34 
GeneralRe: c++ win32, Trouble getting CreateThread and CreateProcess running together Pin
jkirkerx25-Jan-12 9:56
professionaljkirkerx25-Jan-12 9:56 
GeneralRe: c++ win32, Trouble getting CreateThread and CreateProcess running together Pin
Richard Andrew x6425-Jan-12 9:59
professionalRichard Andrew x6425-Jan-12 9:59 
GeneralRe: c++ win32, Trouble getting CreateThread and CreateProcess running together Pin
jkirkerx25-Jan-12 10:04
professionaljkirkerx25-Jan-12 10:04 
QuestionRe: c++ win32, Trouble getting CreateThread and CreateProcess running together Pin
CPallini25-Jan-12 10:12
mveCPallini25-Jan-12 10:12 
AnswerRe: c++ win32, Trouble getting CreateThread and CreateProcess running together Pin
jkirkerx25-Jan-12 10:47
professionaljkirkerx25-Jan-12 10:47 
GeneralDone Pin
jkirkerx25-Jan-12 11:28
professionaljkirkerx25-Jan-12 11:28 
QuestionSHFileOperation with SHFILEOPSTRUCT fails when used with vars but works with string literals Pin
bcb_guy25-Jan-12 1:06
bcb_guy25-Jan-12 1:06 
AnswerRe: SHFileOperation with SHFILEOPSTRUCT fails when used with vars but works with string literals Pin
Jochen Arndt25-Jan-12 1:55
professionalJochen Arndt25-Jan-12 1:55 
AnswerRe: SHFileOperation with SHFILEOPSTRUCT fails when used with vars but works with string literals Pin
Richard Andrew x6425-Jan-12 2:06
professionalRichard Andrew x6425-Jan-12 2:06 
AnswerIssue Resolved! (Of Course User Error) Pin
bcb_guy25-Jan-12 17:41
bcb_guy25-Jan-12 17:41 
GeneralRe: Issue Resolved! (Of Course User Error) Pin
Jochen Arndt25-Jan-12 21:20
professionalJochen Arndt25-Jan-12 21:20 

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.