Click here to Skip to main content
15,921,156 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC help!!! Pin
David Crow2-Mar-04 9:23
David Crow2-Mar-04 9:23 
GeneralRe: MFC help!!! Pin
modeonetwo2-Mar-04 12:43
modeonetwo2-Mar-04 12:43 
GeneralTrying to create static splitter... Pin
Nat292-Mar-04 7:41
Nat292-Mar-04 7:41 
GeneralRe: Trying to create static splitter... Pin
Antti Keskinen2-Mar-04 8:24
Antti Keskinen2-Mar-04 8:24 
GeneralRe: Trying to create static splitter... Pin
Nat292-Mar-04 9:15
Nat292-Mar-04 9:15 
GeneralRe: Trying to create static splitter... Pin
David Crow2-Mar-04 9:27
David Crow2-Mar-04 9:27 
GeneralRe: Trying to create static splitter... Pin
Nat292-Mar-04 10:34
Nat292-Mar-04 10:34 
GeneralRe: Trying to create static splitter... Pin
David Crow2-Mar-04 10:37
David Crow2-Mar-04 10:37 
GeneralRe: Trying to create static splitter... Pin
Nat292-Mar-04 11:22
Nat292-Mar-04 11:22 
GeneralGetting content from HTML control Pin
Vikram A Punathambekar2-Mar-04 5:55
Vikram A Punathambekar2-Mar-04 5:55 
GeneralRe: Getting content from HTML control Pin
Ravi Bhavnani2-Mar-04 6:58
professionalRavi Bhavnani2-Mar-04 6:58 
GeneralRe: Getting content from HTML control Pin
Vikram A Punathambekar2-Mar-04 7:05
Vikram A Punathambekar2-Mar-04 7:05 
GeneralRe: Getting content from HTML control Pin
Ravi Bhavnani2-Mar-04 7:47
professionalRavi Bhavnani2-Mar-04 7:47 
GeneralRe: Getting content from HTML control Pin
Vikram A Punathambekar2-Mar-04 7:34
Vikram A Punathambekar2-Mar-04 7:34 
GeneralRe: Getting content from HTML control Pin
Ravi Bhavnani2-Mar-04 7:50
professionalRavi Bhavnani2-Mar-04 7:50 
GeneralRe: Getting content from HTML control Pin
Ravi Bhavnani2-Mar-04 8:22
professionalRavi Bhavnani2-Mar-04 8:22 
GeneralRe: Getting content from HTML control Pin
Vikram A Punathambekar2-Mar-04 9:32
Vikram A Punathambekar2-Mar-04 9:32 
GeneralRe: Getting content from HTML control Pin
Ravi Bhavnani2-Mar-04 11:17
professionalRavi Bhavnani2-Mar-04 11:17 
GeneralRe: Getting content from HTML control Pin
David Crow2-Mar-04 7:29
David Crow2-Mar-04 7:29 
GeneralWriting large STL vectors to file Pin
inter8ection2-Mar-04 5:52
inter8ection2-Mar-04 5:52 
GeneralRe: Writing large STL vectors to file Pin
valikac2-Mar-04 18:06
valikac2-Mar-04 18:06 
GeneralRe: Writing large STL vectors to file Pin
inter8ection2-Mar-04 23:51
inter8ection2-Mar-04 23:51 
GeneralRe: Writing large STL vectors to file Pin
Robert A. T. Káldy3-Mar-04 1:18
Robert A. T. Káldy3-Mar-04 1:18 
I had a similar problem, when I read a large vector from ifstream via STL.
It's a sad disadvantage of STL - it's too generic to be efficient. For example the stl::copy of vectors is implemented as a cycle, which applies copy constructor to each member of the vector. If you have a vector of complex objects with nontrivial copy constructors, this approach is fair. But if you have for a vector of int's or char's, the STL implementation is too much slower than a simple memcpy.
I think, that std::vector is internally stored as a continuous array of objects, so the iterators to the first and last members should be pointers to begin and end of a memory block, where the array is stored. Thus using of CFile::Write is simple.
Reading a vector is more complex, I think, that you should write your own allocator, which builds a vector from a memory block. But it's only my opinion, I've never write any allocator Frown | :(
The general solution would be to write a STL extension with containers optimized for special member types. Do anybody know, whether such a library exists?

Robert-Antonio

Love, truth and electric traction must gain victory over hate, lie
and diesel traction.

GeneralQuestion using CHttpFile class. Pin
Chris Meech2-Mar-04 5:51
Chris Meech2-Mar-04 5:51 
GeneralWindows XP Theme Conflict Pin
Jnewg52-Mar-04 5:29
Jnewg52-Mar-04 5:29 

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.