Hi dudes.
For some reason this works:
Code:
ofstream out("filename.dat");
char x[3]="ol";
out.write(x, 1);
and this doesnt:
Code:
ofstream out("filename.dat");
unsigned char x[3]="ol";
out.write(x, 1);
and this second code returns me the folowing error: invalid conversion from 'unsigned char *' to 'const char*'
but i dont know why, why cant i use an unsigned char instead of a char. and even in some books the examples use an unsigned char.
Im using the correct headers:
Code:
#include <iostream>
#include <fstream>
#include <ctype.h>
any ideas??