Click here to Skip to main content
15,887,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Convert a char[ ] to int[ ] Pin
NYTSX31-Oct-07 5:19
NYTSX31-Oct-07 5:19 
AnswerRe: Convert a char[ ] to int[ ] [modified] Pin
George L. Jackson31-Oct-07 5:23
George L. Jackson31-Oct-07 5:23 
GeneralRe: Convert a char[ ] to int[ ] Pin
NYTSX31-Oct-07 7:28
NYTSX31-Oct-07 7:28 
GeneralRe: Convert a char[ ] to int[ ] Pin
Roger Stoltz31-Oct-07 7:57
Roger Stoltz31-Oct-07 7:57 
GeneralRe: Convert a char[ ] to int[ ] Pin
George L. Jackson31-Oct-07 8:06
George L. Jackson31-Oct-07 8:06 
QuestionRe: Convert a char[ ] to int[ ] Pin
David Crow31-Oct-07 10:23
David Crow31-Oct-07 10:23 
AnswerRe: Convert a char[ ] to int[ ] Pin
George L. Jackson31-Oct-07 17:14
George L. Jackson31-Oct-07 17:14 
AnswerRe: Convert a char[ ] to int[ ] Pin
Cedric Moonen31-Oct-07 5:26
Cedric Moonen31-Oct-07 5:26 
A simple casting should do the trick:

int* tempInt = (int*)tempChar;

But be carefull with byte ordering ! As the bytes are stored in an inverted way in memory. It means that if you have those bytes in memory:

0x00 0x00 0x00 0x01

And you interprete those bytes as an integer (like you will do with the cast), the resulting integer value won't be one (but 0x01000000).


Cédric Moonen
Software developer

Charting control [v1.2]

GeneralRe: Convert a char[ ] to int[ ] Pin
toxcct31-Oct-07 5:31
toxcct31-Oct-07 5:31 
AnswerRe: Convert a char[ ] to int[ ] Pin
toxcct31-Oct-07 5:30
toxcct31-Oct-07 5:30 
AnswerRe: Convert a char[ ] to int[ ] Pin
Robert Surtees1-Nov-07 10:22
Robert Surtees1-Nov-07 10:22 
QuestionFlickering Problem Pin
mcsherry31-Oct-07 4:28
mcsherry31-Oct-07 4:28 
AnswerRe: Flickering Problem Pin
Mark Salsbery31-Oct-07 5:22
Mark Salsbery31-Oct-07 5:22 
GeneralRe: Flickering Problem Pin
mcsherry31-Oct-07 5:33
mcsherry31-Oct-07 5:33 
AnswerRe: Flickering Problem Pin
mcsherry31-Oct-07 6:00
mcsherry31-Oct-07 6:00 
GeneralRe: Flickering Problem Pin
Mark Salsbery31-Oct-07 6:21
Mark Salsbery31-Oct-07 6:21 
Questionhow to splice two images with diffrent palette? Pin
King Tran31-Oct-07 4:25
King Tran31-Oct-07 4:25 
AnswerRe: how to splice two images with diffrent palette? Pin
Chris Losinger31-Oct-07 8:50
professionalChris Losinger31-Oct-07 8:50 
GeneralRe: how to splice two images with diffrent palette? Pin
King Tran4-Nov-07 2:53
King Tran4-Nov-07 2:53 
QuestionHow to move done project to another computer? Pin
Gofur Halmurat31-Oct-07 4:11
Gofur Halmurat31-Oct-07 4:11 
AnswerRe: How to move done project to another computer? Pin
Cedric Moonen31-Oct-07 4:17
Cedric Moonen31-Oct-07 4:17 
GeneralRe: How to move done project to another computer? Pin
Gofur Halmurat31-Oct-07 4:21
Gofur Halmurat31-Oct-07 4:21 
GeneralRe: How to move done project to another computer? Pin
Matthew Faithfull31-Oct-07 4:18
Matthew Faithfull31-Oct-07 4:18 
AnswerRe: How to move done project to another computer? Pin
Paresh Chitte31-Oct-07 20:02
Paresh Chitte31-Oct-07 20:02 
GeneralRe: How to move done project to another computer? Pin
Gofur Halmurat1-Nov-07 0:16
Gofur Halmurat1-Nov-07 0:16 

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.