Visual Studio has a simple method "File::ReadAllBytes" that will read a file and return a byte array, but I don't know how to use it. I tried the following and they all don't work.
Byte arr[] = File::ReadAllBytes("file.txt");
Byte *arr = File::ReadAllBytes("file.txt");
unsigned char arr[] = File::ReadAllBytes("file.txt");
unsigned char *arr = File::ReadAllBytes("file.txt");
unsigned char *arr;
arr = File::ReadAllBytes("file.txt");
File::ReadAllBytes
is a .NET function, so you cannot call it from C++.You can call it from C++/CLI (Microsoft's .NET version of C++), but you have clarified that you are not using C++/CLI.