Here is the complete program
Code:
#include "stdafx.h"
#include <fstream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char file[255];
fstream a;
strcpy(file,"mel.txt");
a.open(file,ios::in|ios::out, ios::binary|ios::ate);
a.close();
a.clear();
return 0;
}
here is stdafx.h
Code:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
// TODO: reference additional headers your program requires here