Click here to Skip to main content
15,904,024 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MSXML load - not able to read chinese characters in path Pin
Gopi Nath28-Feb-18 23:46
Gopi Nath28-Feb-18 23:46 
QuestionRe: MSXML load - not able to read chinese characters in path Pin
David Crow1-Mar-18 7:26
David Crow1-Mar-18 7:26 
AnswerRe: MSXML load - not able to read chinese characters in path Pin
Victor Nijegorodov1-Mar-18 10:24
Victor Nijegorodov1-Mar-18 10:24 
QuestionRe: MSXML load - not able to read chinese characters in path Pin
Randor 1-Mar-18 14:46
professional Randor 1-Mar-18 14:46 
AnswerRe: MSXML load - not able to read chinese characters in path Pin
Gopi Nath19-Mar-18 23:18
Gopi Nath19-Mar-18 23:18 
QuestionGiven two numbers say a and b. Print their XOR after making the lengths of their binary representation equal by adding trailing zeros to the binary representation of smaller one. Pin
Tarun Jha25-Feb-18 10:14
Tarun Jha25-Feb-18 10:14 
AnswerRe: Given two numbers say a and b. Print their XOR after making the lengths of their binary representation equal by adding trailing zeros to the binary representation of smaller one. Pin
Richard MacCutchan25-Feb-18 21:54
mveRichard MacCutchan25-Feb-18 21:54 
AnswerRe: Given two numbers say a and b. Print their XOR after making the lengths of their binary representation equal by adding trailing zeros to the binary representation of smaller one. Pin
CPallini25-Feb-18 23:17
mveCPallini25-Feb-18 23:17 
Using Richard's suggestion:
C++
unsigned int myxor(unsigned int a, unsigned int b)
{
  if ( a < b) swap(a,b);

  // now a >= b

  int lab = 0; // difference of a and b binary length
  int ca = a;
  int cb = b;
  while ( ca )
  {
    if ( cb == 0 )
      ++lab;
    ca >>= 1;
    cb >>= 1;
  }
  return ( a ^ (b << lab));
}

GeneralRe: Given two numbers say a and b. Print their XOR after making the lengths of their binary representation equal by adding trailing zeros to the binary representation of smaller one. Pin
Richard MacCutchan25-Feb-18 23:32
mveRichard MacCutchan25-Feb-18 23:32 
GeneralRe: Given two numbers say a and b. Print their XOR after making the lengths of their binary representation equal by adding trailing zeros to the binary representation of smaller one. Pin
CPallini25-Feb-18 23:53
mveCPallini25-Feb-18 23:53 
QuestionStrange Debugging results Pin
ForNow24-Feb-18 16:36
ForNow24-Feb-18 16:36 
GeneralRe: Strange Debugging results Pin
Richard MacCutchan24-Feb-18 20:13
mveRichard MacCutchan24-Feb-18 20:13 
GeneralRe: Strange Debugging results Pin
ForNow24-Feb-18 20:38
ForNow24-Feb-18 20:38 
GeneralRe: Strange Debugging results Pin
Richard MacCutchan25-Feb-18 3:43
mveRichard MacCutchan25-Feb-18 3:43 
GeneralRe: Strange Debugging results Pin
ForNow25-Feb-18 5:15
ForNow25-Feb-18 5:15 
GeneralRe: Strange Debugging results Pin
Richard MacCutchan25-Feb-18 6:20
mveRichard MacCutchan25-Feb-18 6:20 
GeneralRe: Strange Debugging results Pin
ForNow25-Feb-18 6:56
ForNow25-Feb-18 6:56 
GeneralRe: Strange Debugging results Pin
ForNow25-Feb-18 8:28
ForNow25-Feb-18 8:28 
GeneralRe: Strange Debugging results Pin
Richard MacCutchan25-Feb-18 21:36
mveRichard MacCutchan25-Feb-18 21:36 
GeneralRe: Strange Debugging results Pin
ForNow26-Feb-18 1:53
ForNow26-Feb-18 1:53 
QuestionWhen an process is loaded Pin
_Flaviu22-Feb-18 23:15
_Flaviu22-Feb-18 23:15 
QuestionRe: When an process is loaded Pin
Richard MacCutchan22-Feb-18 23:18
mveRichard MacCutchan22-Feb-18 23:18 
AnswerRe: When an process is loaded Pin
_Flaviu22-Feb-18 23:35
_Flaviu22-Feb-18 23:35 
GeneralRe: When an process is loaded Pin
Richard MacCutchan22-Feb-18 23:48
mveRichard MacCutchan22-Feb-18 23:48 
QuestionCdialog CWnd* pParent null after passing this pointer to Cdialog constructer Pin
ForNow22-Feb-18 16:46
ForNow22-Feb-18 16:46 

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.