Net functions c++

J

JariTapio

Hei!

How to load data file example "File.Dat" from my homepage with c++ or Visual
c++
program to my "unsigned char g_MyData[256]"..

What commands do i need to use and will the code be very long ??

I have Visual Studio 6.0 Students Pro.

Yours : JT.
 
V

Victor Bazarov

JariTapio said:

Hei yourself.
How to load data file example "File.Dat" from my homepage with c++ or Visual
c++
program to my "unsigned char g_MyData[256]"..

What commands do i need to use and will the code be very long ??

I have Visual Studio 6.0 Students Pro.

You should ask in a newsgroup where accessing web sites (homepage) is on
topic. This newsgroup deals with Standard C++ _language_ which does not
have any HTTP functions. Try comp.os.ms-windows.programmer.win32 or
microsoft.public.vc.language.

V
 
B

Bob Hairgrove

Hei!

How to load data file example "File.Dat" from my homepage with c++ or Visual
c++
program to my "unsigned char g_MyData[256]"..

What commands do i need to use and will the code be very long ??

I have Visual Studio 6.0 Students Pro.

Yours : JT.

Check out the std::fstream and std::istream classes. You will need to
open the file with the std::ios_base::binary flag, then you can call
the read function as many times as you need giving it the pointer to
your array and size of 256 bytes to read. The last time around, eof()
will return true and fewer than 256 bytes will have been read (hint:
you'll have to use one or more of the other member functions to
determine how many bytes were read the last time).

It's all in MSDN under "VC++/Reference/c++ Language/STL" or some
similar path.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top