Click here to Skip to main content
15,891,431 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CListCtrl Pin
Hans Dietrich7-May-07 3:36
mentorHans Dietrich7-May-07 3:36 
GeneralRe: CListCtrl Pin
study.sourabh7-May-07 18:02
study.sourabh7-May-07 18:02 
QuestionNP-complete riddle/algorithm Pin
Yariv6-May-07 23:56
Yariv6-May-07 23:56 
AnswerRe: NP-complete riddle/algorithm Pin
toxcct7-May-07 0:04
toxcct7-May-07 0:04 
GeneralRe: NP-complete riddle/algorithm Pin
Yariv7-May-07 8:47
Yariv7-May-07 8:47 
AnswerRe: NP-complete riddle/algorithm Pin
Hans Dietrich7-May-07 1:36
mentorHans Dietrich7-May-07 1:36 
GeneralRe: NP-complete riddle/algorithm Pin
Yariv7-May-07 8:46
Yariv7-May-07 8:46 
AnswerRe: NP-complete riddle/algorithm Pin
Yariv7-May-07 12:43
Yariv7-May-07 12:43 
Incase someone interested, here is a simple solution. I have no idea why I got stuck from the first place:
<br />
BOOL IsSum(const CUIntArray& Array,UINT Sum) const<br />
{<br />
	for(int i=0;i < Array.GetSize();i++)<br />
	{<br />
		if(Array[i] == Sum)<br />
			return TRUE;<br />
		else if(Array[i] < Sum)<br />
		{<br />
			if(CheckSum(Array,Sum,i,Array[i]))<br />
				return TRUE;<br />
		}<br />
	}<br />
	return FALSE;<br />
}<br />
<br />
BOOL CheckSum(const CUIntArray& Array,UINT Sum,int nIndex,UINT SoFar) const<br />
{<br />
  for(int i=nIndex+1;i < Array.GetSize();i++)<br />
 {<br />
   if((SoFar+Array[i]) == Sum)<br />
     return TRUE;<br />
   else if((SoFar+Array[i])<Sum)<br />
   {<br />
      if(CheckSum(Array,Sum,i,SoFar+Array[i]))<br />
         return TRUE;<br />
   }<br />
 }	<br />
 return FALSE;<br />
}<br />

QuestionScrollBar Presence in ListBox ? Pin
sayed_76-May-07 23:30
sayed_76-May-07 23:30 
AnswerRe: ScrollBar Presence in ListBox ? Pin
prasad_som6-May-07 23:44
prasad_som6-May-07 23:44 
QuestionHow to get PID / Process Name from Task Manager Pin
SNI6-May-07 23:11
SNI6-May-07 23:11 
AnswerRe: How to get PID / Process Name from Task Manager Pin
SNI6-May-07 23:16
SNI6-May-07 23:16 
AnswerRe: How to get PID / Process Name from Task Manager Pin
prasad_som6-May-07 23:24
prasad_som6-May-07 23:24 
GeneralRe: How to get PID / Process Name from Task Manager Pin
ThatsAlok16-May-07 20:00
ThatsAlok16-May-07 20:00 
Questionhow to convert the string type into double type? (vs 2005) Pin
sync_austin6-May-07 23:09
sync_austin6-May-07 23:09 
AnswerRe: how to convert the string type into double type? (vs 2005) Pin
_AnsHUMAN_ 6-May-07 23:15
_AnsHUMAN_ 6-May-07 23:15 
GeneralRe: how to convert the string type into double type? (vs 2005) Pin
toxcct6-May-07 23:19
toxcct6-May-07 23:19 
GeneralRe: how to convert the string type into double type? (vs 2005) Pin
_AnsHUMAN_ 6-May-07 23:24
_AnsHUMAN_ 6-May-07 23:24 
GeneralRe: how to convert the string type into double type? (vs 2005) Pin
Mark Salsbery7-May-07 5:20
Mark Salsbery7-May-07 5:20 
GeneralRe: how to convert the string type into double type? (vs 2005) Pin
toxcct7-May-07 5:26
toxcct7-May-07 5:26 
GeneralRe: how to convert the string type into double type? (vs 2005) Pin
Mark Salsbery7-May-07 5:51
Mark Salsbery7-May-07 5:51 
AnswerRe: how to convert the string type into double type? (vs 2005) Pin
toxcct6-May-07 23:17
toxcct6-May-07 23:17 
GeneralRe: how to convert the string type into double type? (vs 2005) Pin
sync_austin6-May-07 23:31
sync_austin6-May-07 23:31 
GeneralRe: how to convert the string type into double type? (vs 2005) Pin
Mark Salsbery7-May-07 5:57
Mark Salsbery7-May-07 5:57 
GeneralRe: how to convert the string type into double type? (vs 2005) Pin
toxcct7-May-07 6:17
toxcct7-May-07 6:17 

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.