Click here to Skip to main content
15,900,714 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can I read this listview? Pin
sebmajin8-Dec-06 7:16
sebmajin8-Dec-06 7:16 
GeneralRe: How can I read this listview? Pin
Waldermort8-Dec-06 7:49
Waldermort8-Dec-06 7:49 
GeneralRe: How can I read this listview? [modified] Pin
sebmajin8-Dec-06 8:24
sebmajin8-Dec-06 8:24 
AnswerRe: How can I read this listview? Pin
sebmajin9-Dec-06 8:27
sebmajin9-Dec-06 8:27 
QuestionString (Hex) to Hex Pin
suguimoto8-Dec-06 5:03
suguimoto8-Dec-06 5:03 
AnswerRe: String (Hex) to Hex Pin
Roger Stoltz8-Dec-06 5:13
Roger Stoltz8-Dec-06 5:13 
AnswerRe: String (Hex) to Hex Pin
Waldermort8-Dec-06 5:28
Waldermort8-Dec-06 5:28 
GeneralRe: String (Hex) to Hex Pin
suguimoto8-Dec-06 6:15
suguimoto8-Dec-06 6:15 
I aprreciate your effort to help me Big Grin | :-D

so here is the code:
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>

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

	for(int i = 0; i<9; i++){
	fgets(str, 32, fp);
 
	mem[i] = strtol(str, &endptr, 16);

	printf("%i\n\r", mem[i]);
	}
  system("PAUSE");
  return 0;
}


I'm a newbie in c++ and this seems to be a little bit hard for me.
my result:
0
0
2147483647
0
0
2147483647
0
2147483647
2147483647


2147483647(dec) is equal to 7FFFFFFF(hex) =/
whats happening? hehehe

Regards
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 
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 

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.