I am a beginner in C#
I wonder how to write in C# C’s
static void example(const char *filename)
{
FILE *f;
outbuf_size = 10000;
outbuf = malloc(outbuf_size);
f = fopen(filename, "wb");
if (!f) {
fprintf(stderr, "could not open %s\n", filename);
exit(1);
}
fwrite(outbuf, 1, outbuf_size, f);
fclose(f);
}
Plase help.
BTW: Well I am trying to port FFMPEG api-example presented here using Tao.FFMpeg (Tao is .Net wrapper around C#.. old and with sintax exact as in FFMPEG itself) so could you please read that one and tell what I missed in my code sample…
My problem is – I understand how to port FFMpeg part and I just do not det how to port File IO part\function in the way good for .Net
Well, since the sample code of the library you provided reads and writes binary files, I’d suggest System.IO.BinaryReader and System.IO.BinaryWriter.