Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: String (Hex) to Hex Pin
Mark Salsbery8-Dec-06 6:35
Mark Salsbery8-Dec-06 6:35 
GeneralRe: String (Hex) to Hex Pin
Waldermort8-Dec-06 6:42
Waldermort8-Dec-06 6:42 
GeneralRe: String (Hex) to Hex Pin
Mark Salsbery8-Dec-06 6:46
Mark Salsbery8-Dec-06 6:46 
GeneralRe: String (Hex) to Hex Pin
David Crow8-Dec-06 9:15
David Crow8-Dec-06 9:15 
GeneralRe: String (Hex) to Hex Pin
suguimoto10-Dec-06 22:12
suguimoto10-Dec-06 22:12 
QuestionRe: String (Hex) to Hex Pin
David Crow11-Dec-06 2:57
David Crow11-Dec-06 2:57 
GeneralRe: String (Hex) to Hex Pin
David Crow11-Dec-06 2:55
David Crow11-Dec-06 2:55 
GeneralRe: String (Hex) to Hex Pin
suguimoto11-Dec-06 3:07
suguimoto11-Dec-06 3:07 
Thanks!!

It's working!
I used %x to display everything as Hex, and it's working perfectly.

Thank you guys very much!!!

code:

int main(int argc, char* argv[])
{
	FILE *fp;
	fp = fopen("mem.ini", "rt");
	char str[32];
	unsigned int mem[8192];
	char * endptr;
	int teste;

	for(int i = 0; i<8192; i++){

	fgets(str, 32, fp);
 
	mem[i] = strtoul(str, &endptr, 16);
	
	printf("%x\n\r", mem[i]); // %u   to display unsigned values
	}
  system("PAUSE");
  return 0;
}

QuestionRe: String (Hex) to Hex Pin
David Crow11-Dec-06 3:13
David Crow11-Dec-06 3:13 
AnswerRe: String (Hex) to Hex Pin
suguimoto11-Dec-06 3:26
suguimoto11-Dec-06 3:26 
QuestionCString to char* in UNICODE Project? Pin
bosfan8-Dec-06 4:46
bosfan8-Dec-06 4:46 
AnswerRe: CString to char* in UNICODE Project? Pin
Waldermort8-Dec-06 5:16
Waldermort8-Dec-06 5:16 
GeneralRe: CString to char* in UNICODE Project? Pin
bosfan8-Dec-06 5:46
bosfan8-Dec-06 5:46 
AnswerRe: CString to char* in UNICODE Project? Pin
Michael Dunn8-Dec-06 6:02
sitebuilderMichael Dunn8-Dec-06 6:02 
AnswerRe: CString to char* in UNICODE Project? Pin
David Crow8-Dec-06 9:21
David Crow8-Dec-06 9:21 
Questionframe size Pin
radhika288-Dec-06 3:01
radhika288-Dec-06 3:01 
AnswerRe: frame size Pin
Waldermort8-Dec-06 5:09
Waldermort8-Dec-06 5:09 
Question[SDK] How can i import a resource from a dll to an exe file. [modified] Pin
manoj.vicky8-Dec-06 2:56
manoj.vicky8-Dec-06 2:56 
AnswerRe: [SDK] How can i import a resource from a dll to an exe file. Pin
Waldermort8-Dec-06 5:05
Waldermort8-Dec-06 5:05 
GeneralRe: [SDK] How can i import a resource from a dll to an exe file. Pin
manoj.vicky11-Dec-06 19:02
manoj.vicky11-Dec-06 19:02 
AnswerRe: [SDK] How can i import a resource from a dll to an exe file. Pin
Mark Salsbery8-Dec-06 5:48
Mark Salsbery8-Dec-06 5:48 
QuestionGDI++ problem Pin
Neo Andreson8-Dec-06 1:49
Neo Andreson8-Dec-06 1:49 
AnswerRe: GDI++ problem Pin
Hamid_RT8-Dec-06 1:56
Hamid_RT8-Dec-06 1:56 
AnswerRe: GDI++ problem Pin
Mark Salsbery8-Dec-06 5:51
Mark Salsbery8-Dec-06 5:51 
QuestionRelease mode and Debug mode ? Pin
Sakthiu8-Dec-06 0:50
Sakthiu8-Dec-06 0:50 

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.