My program uses a buffer to store data as entered by the user, so that the size of the buffer depends on them. The first thing that came to mind is that I would reallocate memory each time more storage is needed, but that doesn't seem reasonable as the data is small and the program would constantly be reallocating. How does one generally deal with a constantly expanding buffer?
Somersett 0 Newbie Poster
ahamed101 40 Junior Poster
Salem 5,199 Posting Sage
Somersett 0 Newbie Poster
ahamed101 40 Junior Poster
Somersett 0 Newbie Poster
Sci@phy 97 Posting Whiz in Training
Somersett 0 Newbie Poster
Sci@phy 97 Posting Whiz in Training
Somersett 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.