Click here to Skip to main content
14,663,721 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhy CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Yaumen19-Dec-15 20:45
MemberYaumen19-Dec-15 20:45 
QuestionRe: Why CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Richard MacCutchan19-Dec-15 21:11
mveRichard MacCutchan19-Dec-15 21:11 
AnswerRe: Why CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Yaumen19-Dec-15 21:28
MemberYaumen19-Dec-15 21:28 
AnswerRe: Why CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Jochen Arndt20-Dec-15 0:13
professionalJochen Arndt20-Dec-15 0:13 
GeneralRe: Why CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Yaumen20-Dec-15 7:41
MemberYaumen20-Dec-15 7:41 
Questionhow to develop a code for deleting duplicate value of an array from right left? Pin
Member 1221414918-Dec-15 7:04
MemberMember 1221414918-Dec-15 7:04 
SuggestionRe: how to develop a code for deleting duplicate value of an array from right left? Pin
Richard MacCutchan18-Dec-15 7:35
mveRichard MacCutchan18-Dec-15 7:35 
AnswerRe: how to develop a code for deleting duplicate value of an array from right left? Pin
David Crow20-Dec-15 7:40
MemberDavid Crow20-Dec-15 7:40 
First ask yourself: what constitutes a duplicate value?

Instead of going straight to the keyboard to solve this problem, sit at the table with a deck of cards. Ignoring the suits, lay all (or a portion) of the cards out in front of you. Now working from right to left, work through each card and see if it qualifies as a duplicate per your answer from above. This might look something like:
Compare card 52 to card 51.  If they match, remove card 52 from array.
Compare card 51 to card 50.  If they match, remove card 51 from array.
Compare card 50 to card 49.  If they match, remove card 50 from array.
...
Compare card 1 to card 0.  If they match, remove card 1 from array.

An alternative would be if the card is unique, move it to a separate array. Now you can destroy the original array and be left with an array of just unique items.

There are other ways to skin this cat, but it's really going to boil down to what makes the most sense to you. You might not initially have the most elegant or efficient solution as others on this board could come up with, but those skills come in time.

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles


QuestionHow to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez16-Dec-15 23:36
MemberJavier Luis Lopez16-Dec-15 23:36 
AnswerRe: How to increase memory to avoid exception std::bad_alloc? Pin
Jochen Arndt17-Dec-15 0:03
professionalJochen Arndt17-Dec-15 0:03 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez17-Dec-15 0:41
MemberJavier Luis Lopez17-Dec-15 0:41 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Jochen Arndt17-Dec-15 0:50
professionalJochen Arndt17-Dec-15 0:50 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez17-Dec-15 1:03
MemberJavier Luis Lopez17-Dec-15 1:03 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Jochen Arndt17-Dec-15 1:20
professionalJochen Arndt17-Dec-15 1:20 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez17-Dec-15 1:26
MemberJavier Luis Lopez17-Dec-15 1:26 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Jochen Arndt17-Dec-15 1:30
professionalJochen Arndt17-Dec-15 1:30 
PraiseRe: How to increase memory to avoid exception std::bad_alloc? Pin
jeron117-Dec-15 4:04
Memberjeron117-Dec-15 4:04 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez17-Dec-15 22:03
MemberJavier Luis Lopez17-Dec-15 22:03 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
jeron118-Dec-15 3:57
Memberjeron118-Dec-15 3:57 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
CPallini17-Dec-15 21:46
mveCPallini17-Dec-15 21:46 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
David Crow17-Dec-15 2:43
MemberDavid Crow17-Dec-15 2:43 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Chris Losinger17-Dec-15 4:46
professionalChris Losinger17-Dec-15 4:46 
AnswerRe: How to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez17-Dec-15 1:23
MemberJavier Luis Lopez17-Dec-15 1:23 
QuestionSFTP in VS6 Pin
Schehaider_Aymen16-Dec-15 21:39
MemberSchehaider_Aymen16-Dec-15 21:39 
QuestionHiding Registry Information From Readability in Assembler Pin
Lakshmi Dhivya15-Dec-15 20:24
MemberLakshmi Dhivya15-Dec-15 20:24 

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.