Click here to Skip to main content
16,005,037 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRegistered COM component not found in registry Pin
rajeev8229-Aug-07 1:22
rajeev8229-Aug-07 1:22 
AnswerRe: Registered COM component not found in registry Pin
KarstenK29-Aug-07 3:05
mveKarstenK29-Aug-07 3:05 
NewsSuggestion to members. Pin
chandu00429-Aug-07 1:21
chandu00429-Aug-07 1:21 
GeneralRe: Suggestion to members. Pin
toxcct29-Aug-07 2:06
toxcct29-Aug-07 2:06 
QuestionDec to bin Pin
Larsson29-Aug-07 1:04
Larsson29-Aug-07 1:04 
GeneralRe: Dec to bin Pin
_AnsHUMAN_ 29-Aug-07 1:43
_AnsHUMAN_ 29-Aug-07 1:43 
GeneralRe: Dec to bin Pin
chandu00429-Aug-07 1:46
chandu00429-Aug-07 1:46 
AnswerRe: Dec to bin [modified] Pin
_AnsHUMAN_ 29-Aug-07 1:31
_AnsHUMAN_ 29-Aug-07 1:31 
Is it some kind of assignment to you? Anyways here is the code :
int ConvertDecimalToBinary(int i)
{
	int temp = 0 ; 
	int counter = 1; 
	int binary = 0 ; 
	while (0 != i)  
	{
		temp = i%2;
		i = i/2;
		binary += temp*counter;
		counter*=10; 
	}
	return binary;
}

Larsson wrote:
printf("dec: %i bin: ???", i, i);

and yes, printf("dec: %d bin: %d", i, ConvertDecimalToBinary(i));

and this function does have its limitations.
-- modified at 7:43 Wednesday 29th August, 2007

Somethings seem HARD to do, until we know how to do them.
Wink | ;-) _AnShUmAn_

GeneralRe: Dec to bin Pin
chandu00429-Aug-07 1:44
chandu00429-Aug-07 1:44 
GeneralRe: Dec to bin Pin
_AnsHUMAN_ 29-Aug-07 1:50
_AnsHUMAN_ 29-Aug-07 1:50 
GeneralRe: Dec to bin Pin
chandu00429-Aug-07 1:57
chandu00429-Aug-07 1:57 
GeneralRe: Dec to bin Pin
_AnsHUMAN_ 29-Aug-07 2:04
_AnsHUMAN_ 29-Aug-07 2:04 
GeneralRe: Dec to bin Pin
_AnsHUMAN_ 29-Aug-07 2:10
_AnsHUMAN_ 29-Aug-07 2:10 
GeneralRe: Dec to bin Pin
toxcct29-Aug-07 2:15
toxcct29-Aug-07 2:15 
GeneralRe: Dec to bin Pin
David Crow29-Aug-07 2:51
David Crow29-Aug-07 2:51 
GeneralRe: Dec to bin Pin
led mike29-Aug-07 5:06
led mike29-Aug-07 5:06 
GeneralRe: Dec to bin Pin
Mark Salsbery29-Aug-07 7:38
Mark Salsbery29-Aug-07 7:38 
GeneralRe: Dec to bin Pin
Mark Salsbery29-Aug-07 7:43
Mark Salsbery29-Aug-07 7:43 
GeneralRe: Dec to bin Pin
Larsson29-Aug-07 2:51
Larsson29-Aug-07 2:51 
AnswerRe: Dec to bin Pin
toxcct29-Aug-07 2:00
toxcct29-Aug-07 2:00 
QuestionProtection of Windows for SendMessage Pin
Kreatief29-Aug-07 1:02
Kreatief29-Aug-07 1:02 
AnswerRe: Protection of Windows for SendMessage Pin
Kreatief29-Aug-07 20:56
Kreatief29-Aug-07 20:56 
QuestionIs there any way of getting the excel sheet name Pin
philiptabraham29-Aug-07 0:55
philiptabraham29-Aug-07 0:55 
QuestionRe: Is there any way of getting the excel sheet name Pin
David Crow29-Aug-07 2:58
David Crow29-Aug-07 2:58 
QuestionHow to compile projects in oder Pin
Nandu_77b29-Aug-07 0:23
Nandu_77b29-Aug-07 0:23 

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.