Whot is wrong with this script in C++? The error in the compiler is:
error befor '['
The code:
#include <stdio.h>
#include <dos.h>
#include <dir.h>
#include <iostream>
#include <fstream.h>
#include <stdlib.h>
void main(void)
{
char drive [_MAX_DRIVE];
char directory [_MAX_DIR];
char fname [_MAX_FNAME];
char extn [_MAX_EXT];
ofstream outputFile;
const char [100000]
outputFile.open << drive << "//hello.bat" endl;
outputFile << "PAUSE" << endl;
outputFile.close();
return 0;
}
test
error befor '['
The code:
#include <stdio.h>
#include <dos.h>
#include <dir.h>
#include <iostream>
#include <fstream.h>
#include <stdlib.h>
void main(void)
{
char drive [_MAX_DRIVE];
char directory [_MAX_DIR];
char fname [_MAX_FNAME];
char extn [_MAX_EXT];
ofstream outputFile;
const char [100000]
outputFile.open << drive << "//hello.bat" endl;
outputFile << "PAUSE" << endl;
outputFile.close();
return 0;
}
test