#include <fstream>
#include <stdio.h>
#include <iostream>
using namespace std;
int main() {
ifstream file("train-images-idx3-ubyte", ios::in | ios::binary);
unsigned char pixel;
int pixels[47040000];
int i = 0;
while(file.read(reinterpret_cast<char*>(&pixel),1)) {
printf("%d\n", pixel);
i++;
}
printf("\n\n%d", i);
file.close();
}
the int pixels[47040000] line is giving me the error. making the size smaller works, but I need it to be this size.