#include
#include
#include
using namespace std;
int main(int argc, char *argv[]){
if(argc!=4){
cout << "Usage: change " << endl;
exit(1);
}
fstream out(argv[1], ios::in | ios::out | ios::binary);
if(!out)
{
cout << "Cannot open file!";
exit(1);
}
out.seekp(atoi(argv[2]), ios::beg);
out.put(*argv[3]);
cout << "Current position is: " << out.tellp() << endl;
out.close();
}