ofstream oFile; oFile.open(...); oFile << "1234" << 7 ;
write(fd,"1234",4);
int x = 7; write(fd, &x,sizeof(int));