this is my code,,,,,,
now it seems to do the job i want but when i check th text file this is what i get on the top line, i was ecpecting the hello but i don't know hy the rest is there.Code:#include <iostream> #include <fstream> using namespace std; int main () { int pos=50; int posy; ofstream out; out.open ("fileio6.txt"); out.write ( "hello",pos); pos=out.tellp(); cout<< pos; }
hello fileio5.txt x@ X ÿÿÿÿ
if you could tell me why i would appreciate it llllloooooooootts