Click here to Skip to main content
15,037,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Unhandled C++ expression Pin
Chris Meech9-Apr-10 5:11
MemberChris Meech9-Apr-10 5:11 
AnswerRe: Unhandled C++ expression Pin
Chris Losinger9-Apr-10 3:24
professionalChris Losinger9-Apr-10 3:24 
GeneralRe: Unhandled C++ expression Pin
browneyes869-Apr-10 6:39
Memberbrowneyes869-Apr-10 6:39 
QuestionHow can merge 2 CUIntArray? Pin
Le@rner8-Apr-10 23:59
MemberLe@rner8-Apr-10 23:59 
AnswerRe: How can merge 2 CUIntArray? Pin
Eugen Podsypalnikov9-Apr-10 0:17
MemberEugen Podsypalnikov9-Apr-10 0:17 
GeneralRe: How can merge 2 CUIntArray? Pin
Le@rner9-Apr-10 0:27
MemberLe@rner9-Apr-10 0:27 
GeneralRe: How can merge 2 CUIntArray? [modified] Pin
CPallini9-Apr-10 0:42
mveCPallini9-Apr-10 0:42 
GeneralRe: How can merge 2 CUIntArray? [modified] Pin
Eugen Podsypalnikov9-Apr-10 0:57
MemberEugen Podsypalnikov9-Apr-10 0:57 
A (maybe needed to be optimized) version Smile | :) :
void ProcessMerging(CUIntArray* pcaResult,
                    const CUIntArray& caFirst,
                    const CUIntArray& caSecond)
{
  if (pcaResult) {
    pcaResult->RemoveAll();
    int iFirstSize(caFirst.GetSize()),
        iSecondSize(caSecond.GetSize()),
        iMaxSize(max(iFirstSize, iSecondSize));
    for (int i = 0; i < iMaxSize; i++) {
      bool bFirstPresented(i < iFirstSize),
           bSecondPresented(i < iSecondSize);
      if (bFirstPresented) {
        pcaResult->Add(caFirst[i]);
        if (bSecondPresented &&
            caFirst[i] != caSecond[i]) {
          pcaResult->Add(caSecond[i]);
        }
      } else {
        pcaResult->Add(caSecond[i]);
      }
    }
  }
}

virtual void BeHappy() = 0;
modified on Friday, April 9, 2010 7:27 AM

GeneralRe: How can merge 2 CUIntArray? Pin
CPallini9-Apr-10 1:08
mveCPallini9-Apr-10 1:08 
GeneralRe: How can merge 2 CUIntArray? Pin
Eugen Podsypalnikov9-Apr-10 1:13
MemberEugen Podsypalnikov9-Apr-10 1:13 
GeneralRe: How can merge 2 CUIntArray? [updated] Pin
CPallini9-Apr-10 2:36
mveCPallini9-Apr-10 2:36 
GeneralRe: How can merge 2 CUIntArray? Pin
Eugen Podsypalnikov9-Apr-10 3:05
MemberEugen Podsypalnikov9-Apr-10 3:05 
GeneralRe: How can merge 2 CUIntArray? Pin
CPallini9-Apr-10 3:17
mveCPallini9-Apr-10 3:17 
GeneralRe: How can merge 2 CUIntArray? Pin
Eugen Podsypalnikov9-Apr-10 3:34
MemberEugen Podsypalnikov9-Apr-10 3:34 
GeneralRe: How can merge 2 CUIntArray? Pin
CPallini9-Apr-10 7:11
mveCPallini9-Apr-10 7:11 
AnswerRe: How can merge 2 CUIntArray? Pin
CPallini9-Apr-10 0:23
mveCPallini9-Apr-10 0:23 
GeneralRe: How can merge 2 CUIntArray? Pin
David Crow9-Apr-10 3:54
MemberDavid Crow9-Apr-10 3:54 
GeneralRe: How can merge 2 CUIntArray? Pin
CPallini9-Apr-10 7:16
mveCPallini9-Apr-10 7:16 
GeneralRe: How can merge 2 CUIntArray? Pin
David Crow9-Apr-10 7:40
MemberDavid Crow9-Apr-10 7:40 
GeneralRe: How can merge 2 CUIntArray? Pin
CPallini9-Apr-10 8:35
mveCPallini9-Apr-10 8:35 
GeneralRe: How can merge 2 CUIntArray? Pin
Eugen Podsypalnikov9-Apr-10 9:42
MemberEugen Podsypalnikov9-Apr-10 9:42 
QuestionMarquee Progress Control Pin
JM22518-Apr-10 21:32
MemberJM22518-Apr-10 21:32 
AnswerRe: Marquee Progress Control Pin
Eugen Podsypalnikov8-Apr-10 22:07
MemberEugen Podsypalnikov8-Apr-10 22:07 
GeneralRe: Marquee Progress Control Pin
JM22518-Apr-10 22:16
MemberJM22518-Apr-10 22:16 
GeneralRe: Marquee Progress Control Pin
Eugen Podsypalnikov8-Apr-10 22:55
MemberEugen Podsypalnikov8-Apr-10 22:55 

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.