Click here to Skip to main content
15,913,090 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMFC New Feature pack style problem! Pin
m_code23-May-10 22:21
m_code23-May-10 22:21 
QuestionChange Button Image on mouse over Pin
AbhiHcl23-May-10 21:50
AbhiHcl23-May-10 21:50 
AnswerRe: Change Button Image on mouse over Pin
namaskaaram23-May-10 23:35
namaskaaram23-May-10 23:35 
QuestionHow to Convert CString to char array? Pin
TechAvtar23-May-10 19:14
TechAvtar23-May-10 19:14 
AnswerRe: How to Convert CString to char array? Pin
Yusuf23-May-10 19:28
Yusuf23-May-10 19:28 
AnswerRe: How to Convert CString to char array? Pin
MS_TJ23-May-10 19:43
MS_TJ23-May-10 19:43 
AnswerRe: How to Convert CString to char array? Pin
Iain Clarke, Warrior Programmer23-May-10 20:56
Iain Clarke, Warrior Programmer23-May-10 20:56 
AnswerRe: How to Convert CString to char array? Pin
Aescleal24-May-10 4:17
Aescleal24-May-10 4:17 
QuestionSplitter Window for MDI. Pin
janaswamy uday23-May-10 16:04
janaswamy uday23-May-10 16:04 
QuestionHow to include a dll and a lib files into a VS project Pin
Schehaider_Aymen23-May-10 11:18
Schehaider_Aymen23-May-10 11:18 
AnswerRe: How to include a dll and a lib files into a VS project Pin
Garth J Lancaster23-May-10 12:36
professionalGarth J Lancaster23-May-10 12:36 
GeneralRe: How to include a dll and a lib files into a VS project [modified] Pin
Schehaider_Aymen23-May-10 12:43
Schehaider_Aymen23-May-10 12:43 
GeneralRe: How to include a dll and a lib files into a VS project Pin
Garth J Lancaster23-May-10 12:56
professionalGarth J Lancaster23-May-10 12:56 
GeneralRe: How to include a dll and a lib files into a VS project Pin
Schehaider_Aymen23-May-10 12:57
Schehaider_Aymen23-May-10 12:57 
QuestionStarting a password protected NT Service [modified] Pin
pubis23-May-10 9:13
pubis23-May-10 9:13 
AnswerRe: Starting a password protected NT Service Pin
Aescleal23-May-10 9:59
Aescleal23-May-10 9:59 
GeneralRe: Starting a password protected NT Service Pin
pubis23-May-10 10:15
pubis23-May-10 10:15 
GeneralRe: Starting a password protected NT Service Pin
Aescleal23-May-10 10:24
Aescleal23-May-10 10:24 
GeneralRe: Starting a password protected NT Service Pin
pubis23-May-10 10:56
pubis23-May-10 10:56 
QuestionWM_QUERYENDSESSION problem on C++ Builder 2010 Pin
Member 88968923-May-10 7:06
Member 88968923-May-10 7:06 
AnswerRe: WM_QUERYENDSESSION problem on C++ Builder 2010 Pin
ARopo24-May-10 6:26
ARopo24-May-10 6:26 
GeneralRe: WM_QUERYENDSESSION problem on C++ Builder 2010 Pin
Member 88968924-May-10 13:36
Member 88968924-May-10 13:36 
QuestionC++ String Creation Pin
sikas_Cisco23-May-10 4:57
sikas_Cisco23-May-10 4:57 
AnswerRe: C++ String Creation Pin
Dr.Walt Fair, PE23-May-10 5:18
professionalDr.Walt Fair, PE23-May-10 5:18 
AnswerRe: C++ String Creation Pin
John R. Shaw23-May-10 7:21
John R. Shaw23-May-10 7:21 
Sounds like home work, but I'll explain it any way.

This is a simple binary example; where 'a' implies bit not set and 'b' implies bet set.

Possible solutions:
for( int i = 0; i < 4; ++i )
{
   if( 2 & i )
      std::cout << "b";
   else
      std::cout << "a";
   if( 1 & i )
      std::cout << "b";
   else
      std::cout << "a";
   std::cout << std::endl;
}

OR
char c[2] = { 'a', 'b' };
for( int i = 0; i < 4; ++i )
{
   std::cout << c[1 & (i>>1)];
   std::cout << c[1 & i];
   std::cout << std::endl;
}

INTP
"Program testing can be used to show the presence of bugs, but never to show their absence." - Edsger Dijkstra
"I have never been lost, but I will admit to being confused for several weeks. " - Daniel Boone

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.