Reading File Data into 2D Vector

AI Thread Summary
To read file data into a 2D vector, it's essential to clarify the type of vector being used, such as a standard template library (STL) vector. If not using STL, a custom 2D memory allocation is necessary. The content of the file—whether it contains characters, integers, doubles, or strings—along with its formatting and size, significantly influences the approach. For example, typical desktop PCs may face limitations when attempting to read more than 2GB of integers into memory simultaneously, although the file can still be stored on disk.
Sadmemo
Messages
32
Reaction score
0
How can i read file data into 2d vector ?thanks
 
Computer science news on Phys.org
What kind of "vector?" A standard template library vector<?>, or what?

- Warren
 
uh you got to create a vector or 2D memory allocation if your not using the STL-vector that chroot mentioned. Heh nice name chroot->>>BOO LINUX :smile:
 
It also matters what this file contains (chars, ints, doubles, strings, ...), how it is formatted, and how much data it contains. For instance on a typical desktop PC you will not be able to read more than 2GB of ints into memory at once altough you will be able to hold the file on disk just fine.
 
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Back
Top