0

les say we have a binary file. and 1st letter is 3.
how do i take 3 and put it into a char ar[].

what i did was

if(fread(ar, 1, 1, fine))
{

}

Edited by Ezzaral: Code formatting.

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by Ancient Dragon
0

If you want to put it into the first byte of ar[] then what you posted is ok. If you want to put it somewhere else then you have to tell the compiler where to put it, e.g. fread( &ar[i], 1, 1, fine);

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.