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

C / C++ / MFC

 
QuestionHow can I avoid "Socket Notification Sink" error? Pin
rambojanggoon1-Nov-09 1:19
rambojanggoon1-Nov-09 1:19 
AnswerRe: How can I avoid "Socket Notification Sink" error? Pin
Moak2-Nov-09 9:22
Moak2-Nov-09 9:22 
QuestionTo convert a DAT file to a BMP file Pin
sgd.ind31-Oct-09 20:55
sgd.ind31-Oct-09 20:55 
AnswerRe: To convert a DAT file to a BMP file Pin
Code-o-mat1-Nov-09 3:00
Code-o-mat1-Nov-09 3:00 
GeneralRe: To convert a DAT file to a BMP file Pin
sgd.ind1-Nov-09 3:21
sgd.ind1-Nov-09 3:21 
GeneralRe: To convert a DAT file to a BMP file Pin
Code-o-mat1-Nov-09 3:46
Code-o-mat1-Nov-09 3:46 
Questionconvert md5 values to decimal Pin
nuttynibbles31-Oct-09 20:14
nuttynibbles31-Oct-09 20:14 
AnswerRe: convert md5 values to decimal Pin
CPallini31-Oct-09 21:20
mveCPallini31-Oct-09 21:20 
This string contains 32 hexadecimal digits. So may represent 16 bytes, as well 8 shorts, as well 4 int.
If you need to convert it into an array of bytes (unsigned char) try something similar to:
#include <stdio.h>
void main()
{
	char  hash[] = "df310c24eb35eee2af4f83bed8bee284";
	char * p = hash;
	const unsigned int SIZE = (sizeof(hash)-1)/2;
	unsigned char arr[SIZE];
	unsigned int count=0;
	while (count < SIZE)
	{
		if (sscanf(p, "%2x", &arr[count]) != 1)
		{
			// handle error
		}
		count++;
		p+=2;
	}
}


If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

Questionreverse division to convert decimals to dinary Pin
Omegaclass31-Oct-09 19:57
Omegaclass31-Oct-09 19:57 
AnswerRe: reverse division to convert decimals to dinary Pin
CPallini31-Oct-09 21:04
mveCPallini31-Oct-09 21:04 
GeneralRe: reverse division to convert decimals to dinary Pin
Omegaclass31-Oct-09 21:36
Omegaclass31-Oct-09 21:36 
GeneralRe: reverse division to convert decimals to dinary Pin
CPallini1-Nov-09 6:32
mveCPallini1-Nov-09 6:32 
GeneralRe: reverse division to convert decimals to dinary Pin
Omegaclass1-Nov-09 10:10
Omegaclass1-Nov-09 10:10 
GeneralRe: reverse division to convert decimals to dinary Pin
CPallini1-Nov-09 10:13
mveCPallini1-Nov-09 10:13 
GeneralRe: reverse division to convert decimals to dinary Pin
Omegaclass1-Nov-09 12:28
Omegaclass1-Nov-09 12:28 
AnswerRe: reverse division to convert decimals to dinary Pin
David Crow2-Nov-09 4:08
David Crow2-Nov-09 4:08 
GeneralRe: reverse division to convert decimals to dinary Pin
Omegaclass2-Nov-09 17:15
Omegaclass2-Nov-09 17:15 
QuestionRe: reverse division to convert decimals to dinary Pin
David Crow3-Nov-09 2:44
David Crow3-Nov-09 2:44 
AnswerRe: reverse division to convert decimals to dinary Pin
Omegaclass3-Nov-09 19:08
Omegaclass3-Nov-09 19:08 
QuestionUgly Numbers Error Pin
anollipian31-Oct-09 14:21
anollipian31-Oct-09 14:21 
AnswerRe: Ugly Numbers Error Pin
LunaticFringe31-Oct-09 14:30
LunaticFringe31-Oct-09 14:30 
GeneralRe: Ugly Numbers Error Pin
anollipian31-Oct-09 14:44
anollipian31-Oct-09 14:44 
GeneralRe: Ugly Numbers Error Pin
Luc Pattyn1-Nov-09 3:59
sitebuilderLuc Pattyn1-Nov-09 3:59 
QuestionRe: Ugly Numbers Error Pin
David Crow31-Oct-09 16:26
David Crow31-Oct-09 16:26 
Question2 Errors Pin
MrMcIntyre31-Oct-09 6:09
MrMcIntyre31-Oct-09 6:09 

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.