Click here to Skip to main content
15,899,937 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to let ado's data import to ms-word and then print Pin
yugiant14-Oct-09 6:15
yugiant14-Oct-09 6:15 
AnswerRe: how to let ado's data import to ms-word and then print Pin
David Crow14-Oct-09 7:35
David Crow14-Oct-09 7:35 
Questionchange code inside function body of dll file, dangerous? Pin
includeh1014-Oct-09 5:58
includeh1014-Oct-09 5:58 
AnswerRe: change code inside function body of dll file, dangerous? Pin
Randor 14-Oct-09 6:54
professional Randor 14-Oct-09 6:54 
AnswerRe: change code inside function body of dll file, dangerous? Pin
Rajesh R Subramanian14-Oct-09 7:49
professionalRajesh R Subramanian14-Oct-09 7:49 
AnswerRe: change code inside function body of dll file, dangerous? Pin
Moak14-Oct-09 9:49
Moak14-Oct-09 9:49 
Questioncalculation error Pin
kbury14-Oct-09 5:13
kbury14-Oct-09 5:13 
AnswerRe: calculation error Pin
CPallini14-Oct-09 5:37
mveCPallini14-Oct-09 5:37 
GeneralRe: calculation error Pin
kbury14-Oct-09 5:43
kbury14-Oct-09 5:43 
GeneralRe: calculation error Pin
CPallini14-Oct-09 7:04
mveCPallini14-Oct-09 7:04 
AnswerRe: calculation error Pin
David Crow14-Oct-09 7:39
David Crow14-Oct-09 7:39 
AnswerRe: calculation error [modified] Pin
Patcher3214-Oct-09 12:52
Patcher3214-Oct-09 12:52 
AnswerRe: calculation error Pin
Luc Pattyn14-Oct-09 13:41
sitebuilderLuc Pattyn14-Oct-09 13:41 
GeneralRe: calculation error Pin
kbury15-Oct-09 5:07
kbury15-Oct-09 5:07 
GeneralRe: calculation error Pin
Luc Pattyn15-Oct-09 5:38
sitebuilderLuc Pattyn15-Oct-09 5:38 
QuestionHow to convert the vbscript to c++ using adsi Pin
raja 414-Oct-09 4:59
raja 414-Oct-09 4:59 
AnswerRe: How to convert the vbscript to c++ using adsi Pin
David Crow15-Oct-09 3:15
David Crow15-Oct-09 3:15 
QuestionEnabling and Disadbling Toolbar Buttons. Pin
hariakuthota14-Oct-09 4:43
hariakuthota14-Oct-09 4:43 
AnswerRe: Enabling and Disadbling Toolbar Buttons. Pin
CPallini14-Oct-09 5:27
mveCPallini14-Oct-09 5:27 
QuestionProblem in C++ Template definition Pin
gourishsio14-Oct-09 4:32
gourishsio14-Oct-09 4:32 
AnswerRe: Problem in C++ Template definition Pin
CPallini14-Oct-09 5:24
mveCPallini14-Oct-09 5:24 
AnswerRe: Problem in C++ Template definition [modified] Pin
Stuart Dootson14-Oct-09 6:19
professionalStuart Dootson14-Oct-09 6:19 
C++ doesn't look at the return type when doing deducing types (or overload resolution for that matter), so you can't do what you want directly.

However, try defining find like this:

template<typename K, typename T, typename Function>
std::vector<K> find( std::vector<T> &a, Function _predicate )
{
   // Your code
}


and using it like this, specifying K explicitly:

std::vector<int> b = find<int>( a, is_true<int>() );


BTW - a better name for the function would be 'filter' or 'find_if' (IMNSHO)

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

modified on Wednesday, October 14, 2009 2:45 PM

QuestionCreating a Status Bar in DialogBased Application Pin
Hari_1614-Oct-09 3:49
Hari_1614-Oct-09 3:49 
AnswerRe: Creating a Status Bar in DialogBased Application Pin
Roger Stoltz14-Oct-09 4:47
Roger Stoltz14-Oct-09 4:47 
AnswerRe: Creating a Status Bar in DialogBased Application Pin
David Crow14-Oct-09 7:52
David Crow14-Oct-09 7:52 

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.