Click here to Skip to main content
15,902,938 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Forum help Pin
George L. Jackson30-Sep-07 2:02
George L. Jackson30-Sep-07 2:02 
QuestionQuestions about reading binary files [modified] Pin
GentooGuy28-Sep-07 13:47
GentooGuy28-Sep-07 13:47 
AnswerRe: Questions about reading binary files Pin
Mark Salsbery28-Sep-07 15:16
Mark Salsbery28-Sep-07 15:16 
AnswerRe: Questions about reading binary files Pin
Mark Salsbery28-Sep-07 15:22
Mark Salsbery28-Sep-07 15:22 
GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 7:25
GentooGuy29-Sep-07 7:25 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery29-Sep-07 7:39
Mark Salsbery29-Sep-07 7:39 
QuestionRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 8:05
GentooGuy29-Sep-07 8:05 
AnswerRe: Questions about reading binary files Pin
Mark Salsbery29-Sep-07 8:22
Mark Salsbery29-Sep-07 8:22 
I'm surprised it gets that far, since you delete memblock in readFile() Smile | :)

I'm curious....why are you reading bytes from a jpeg file as ints
cout << hex << (int)memblock[i]<<endl;
and why would you be swapping byte order?  Are you trying to make the jpeg unreadable?

Actually, this whole loop doesn't make sense

for(int i=0;i<100;i++)<br />
{   <br />
    char x = memblock[i];<br />
    cout << hex << (int)memblock[i]<<endl;<br />
}


You're indexing the array by bytes but casting to int (4 bytes)???


Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 8:52
GentooGuy29-Sep-07 8:52 
GeneralRe: Questions about reading binary files Pin
Luc Pattyn29-Sep-07 9:15
sitebuilderLuc Pattyn29-Sep-07 9:15 
GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 9:20
GentooGuy29-Sep-07 9:20 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery29-Sep-07 9:16
Mark Salsbery29-Sep-07 9:16 
GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 9:20
GentooGuy29-Sep-07 9:20 
GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 10:27
GentooGuy29-Sep-07 10:27 
GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 10:52
GentooGuy29-Sep-07 10:52 
GeneralRe: Questions about reading binary files [modified*2] Pin
Mark Salsbery29-Sep-07 11:08
Mark Salsbery29-Sep-07 11:08 
GeneralRe: Questions about reading binary files [modified*2] Pin
GentooGuy30-Sep-07 2:40
GentooGuy30-Sep-07 2:40 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery30-Sep-07 6:31
Mark Salsbery30-Sep-07 6:31 
GeneralRe: Questions about reading binary files Pin
GentooGuy30-Sep-07 6:37
GentooGuy30-Sep-07 6:37 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery30-Sep-07 6:47
Mark Salsbery30-Sep-07 6:47 
GeneralRe: Questions about reading binary files Pin
GentooGuy30-Sep-07 6:55
GentooGuy30-Sep-07 6:55 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery30-Sep-07 7:10
Mark Salsbery30-Sep-07 7:10 
GeneralRe: Questions about reading binary files Pin
GentooGuy30-Sep-07 14:51
GentooGuy30-Sep-07 14:51 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery29-Sep-07 11:11
Mark Salsbery29-Sep-07 11:11 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery29-Sep-07 11:22
Mark Salsbery29-Sep-07 11:22 

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.