View Single Post
Old Sep 9th, 2005, 1:00 AM   #2
BinaryStorm
Programmer
 
BinaryStorm's Avatar
 
Join Date: Sep 2005
Location: Požega, Croatia
Posts: 93
Rep Power: 4 BinaryStorm is on a distinguished road
If the size is unknown, it is best to use vectors. Vectors are resizeable.
So you can simply create vector of type int, and store file contents there.
#include <vector>
using std::vector;
.
.
.

vector <int> data;
for (int i=0; i<sizeof (pointerToText); i++)
{
    data[i] = something;
}
BinaryStorm is offline   Reply With Quote