Reading File Data into 2D Vector

Click For Summary

Discussion Overview

The discussion revolves around the methods for reading file data into a 2D vector, touching on various aspects such as data types, memory allocation, and file size limitations.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant asks how to read file data into a 2D vector.
  • Another participant questions what type of vector is being referred to, suggesting the need for clarification on whether it is a standard template library vector.
  • A participant mentions the necessity of creating a vector or performing 2D memory allocation if not using the STL vector.
  • It is noted that the content of the file (e.g., chars, ints, doubles, strings) and its formatting are significant factors in the reading process.
  • Concerns are raised about memory limitations, specifically that a typical desktop PC may not be able to read more than 2GB of integers into memory at once, despite being able to store the file on disk.

Areas of Agreement / Disagreement

Participants have not reached a consensus, and multiple competing views remain regarding the type of vector and the implications of file content and size on the reading process.

Contextual Notes

Limitations include the need for clarification on the type of vector and the specific data types being handled, as well as unresolved considerations regarding memory allocation and file size constraints.

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.
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
14
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
38
Views
5K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K