prain
asked on
How to convert a Text File into a byte array in C++
Any one knows how to convert a given text file (unknown size) into a byte array in C++. Please do not answer this in C or C# or Java. I want this in C++.
Thanks
prain
Thanks
prain
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Actually, it should be
BYTE* pArr = new BYTE[buf.st_size];
Sorry about that.
ASKER
More points.
ASKER
Ok, with all due respect to sarabande's answer, I accept jrk's because it fits our coding style well.
I have increased the points to 200 and given the increased amount to sarabande, while jrk get full points I promised first.
Thanks guys again.
-prain
I have increased the points to 200 and given the increased amount to sarabande, while jrk get full points I promised first.
Thanks guys again.
-prain
ASKER
you meant pAdd and not pArr right? I do not see pAdd is being used anywhere after it is defined.
prain