Click here to Skip to main content
15,905,782 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Run at .Net 2.0 (errors) Pin
Mark Salsbery24-May-07 8:57
Mark Salsbery24-May-07 8:57 
GeneralRe: Run at .Net 2.0 (errors) Pin
Tal S.24-May-07 9:02
Tal S.24-May-07 9:02 
QuestionHTTP send request Pin
deeps_cute23-May-07 20:23
deeps_cute23-May-07 20:23 
QuestionHow to write map to file? Pin
sandeepkavade23-May-07 20:13
sandeepkavade23-May-07 20:13 
AnswerRe: How to write map to file? Pin
Cedric Moonen23-May-07 21:06
Cedric Moonen23-May-07 21:06 
AnswerRe: How to write map to file? Pin
Naveen23-May-07 21:13
Naveen23-May-07 21:13 
QuestionReg. System menu close button disabling in 64bit OS Pin
Ravinder Are23-May-07 20:09
Ravinder Are23-May-07 20:09 
Questionhow to write a file of bytes Pin
Brigit Ananya23-May-07 19:39
Brigit Ananya23-May-07 19:39 
I am trying to create a file of bytes from my character array
const char* chars with length int count.

I wrote the C++ code:
FileStream file = new FileStream(S"chars.dat", FileMode::Create,
FileAccess::Write);
BinaryWriter binary = new BinaryWriter(file);
binary.write(chars, count); //it might just be binary.write(chars)
binary.close();

My compiler doesn't recognize FileStream and BinaryWriter, and when I try:
using namespace System::IO;
the compiler says that a namespace with this name does not exist.

Is my code correct, and what "using" or "include" do I need?
Also, I copied new FileStream(S"pixels.dat",...) from somewhere and I
don't know what the "S" means?

(By the way, I will later want to read this file in Java using DataInputStream.)

Thanks for reading this. Smile | :)

AnswerRe: how to write a file of bytes Pin
CPallini23-May-07 20:22
mveCPallini23-May-07 20:22 
AnswerRe: how to write a file of bytes Pin
sandeepkavade23-May-07 20:23
sandeepkavade23-May-07 20:23 
GeneralRe: how to write a file of bytes Pin
Brigit Ananya24-May-07 3:26
Brigit Ananya24-May-07 3:26 
QuestionSTL map question Pin
User 58385223-May-07 19:00
User 58385223-May-07 19:00 
AnswerRe: STL map question Pin
led mike23-May-07 19:48
led mike23-May-07 19:48 
GeneralRe: STL map question Pin
User 58385223-May-07 19:52
User 58385223-May-07 19:52 
GeneralRe: STL map question Pin
led mike24-May-07 4:45
led mike24-May-07 4:45 
AnswerRe: STL map question Pin
markkuk23-May-07 22:16
markkuk23-May-07 22:16 
AnswerRe: STL map question Pin
BadKarma23-May-07 22:56
BadKarma23-May-07 22:56 
QuestionWithout m_pMainWnd Pin
sawerr23-May-07 18:40
sawerr23-May-07 18:40 
AnswerRe: Without m_pMainWnd Pin
Naveen23-May-07 18:56
Naveen23-May-07 18:56 
GeneralRe: Without m_pMainWnd Pin
sawerr23-May-07 19:40
sawerr23-May-07 19:40 
GeneralRe: Without m_pMainWnd Pin
Naveen23-May-07 19:50
Naveen23-May-07 19:50 
GeneralRe: Without m_pMainWnd Pin
tom groezer24-May-07 1:24
tom groezer24-May-07 1:24 
GeneralRe: Without m_pMainWnd Pin
Mark Salsbery24-May-07 7:37
Mark Salsbery24-May-07 7:37 
GeneralRe: Without m_pMainWnd Pin
Naveen24-May-07 13:57
Naveen24-May-07 13:57 
QuestionGit image on button Pin
prathuraj23-May-07 18:13
prathuraj23-May-07 18:13 

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.