Click here to Skip to main content
15,883,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Unhandled C++ expression Pin
Chris Meech9-Apr-10 5:11
Chris 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
browneyes869-Apr-10 6:39 
QuestionHow can merge 2 CUIntArray? Pin
Le@rner8-Apr-10 23:59
Le@rner8-Apr-10 23:59 
AnswerRe: How can merge 2 CUIntArray? Pin
Eugen Podsypalnikov9-Apr-10 0:17
Eugen Podsypalnikov9-Apr-10 0:17 
GeneralRe: How can merge 2 CUIntArray? Pin
Le@rner9-Apr-10 0:27
Le@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
Eugen 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
Eugen 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
Eugen 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
Eugen 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
David 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
David 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
Eugen Podsypalnikov9-Apr-10 9:42 
QuestionMarquee Progress Control Pin
JM22518-Apr-10 21:32
JM22518-Apr-10 21:32 
AnswerRe: Marquee Progress Control Pin
Eugen Podsypalnikov8-Apr-10 22:07
Eugen Podsypalnikov8-Apr-10 22:07 
GeneralRe: Marquee Progress Control Pin
JM22518-Apr-10 22:16
JM22518-Apr-10 22:16 
GeneralRe: Marquee Progress Control Pin
Eugen Podsypalnikov8-Apr-10 22:55
Eugen 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.