Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by jsitke

  1. jsitke

    WinInet - multipart POST issue

    I am doing a multipart POST to a form. The data contains a ZIP file so I need to include a "boundary". The problem I am having is that I cannot add the boundaries in between the data. Whenever I add them, it never shows uip in the header. How can I add the proper headers to my POST...
  2. jsitke

    Fastest way to read a file into a char*

    I need to contain the entire file stream in the buffer, therefore the buffer should be the same size as the file. I am running the code below, but it seems to hang. However if I output to a file ofstream out ("test.txt",ofstream::binary) it does not hang... { char *buff...
  3. jsitke

    Fastest way to read a file into a char*

    I am now trying this code block: #include <string> std::ifstream in(fileName); std::ostringstream tmp; tmp << in.rdbuf(); std::string str = tmp.str(); And I get these of compilation errors: D:\DOCs\inetConsole\inetConsole.cpp(307) : error C2079: 'in' uses undefined...
  4. jsitke

    Fastest way to read a file into a char*

    OK. But when I dump the buffer to out: cout << &quot;Buffer Contents:&quot; << buffer I only get a few chars. How can I dump the entire buffer? -j
  5. jsitke

    Fastest way to read a file into a char*

    Why are the buffers only a sizeof 4 after the code is excuted? I need to fill the buffer completely. long lSize; char * buffer; lSize = 10504120 ifstream in; in.open (fileName); filebuf *pbuf; pbuf=in.rdbuf(); pbuf->sgetn (buffer,lSize); cout <<...
  6. jsitke

    Fastest way to read a file into a char*

    Here was some code submitted by Dietmar Kuehl... Just read the file when constructing the string: int main() { std::ifstream in(filename); std::istreambuf_iterator<char> beg(in), end; std::string str(beg, end); }
  7. jsitke

    Fastest way to read a file into a char*

    I have been looking into the fastest way to read a file into a char*. I have seen some code implementing istreambuf_iterator. Any one else have any experiences with this? - julian

Part and Inventory Search

Back
Top