Functions and Creating Files
Im working on a project that is supposed to let the user enter a title and some text and the program is supposed to create the file and then give the user the option to view it, i am very lost at the moment and any help would be great
thanks
void CreateText(void);
int main()
{
const int Max=80;
char filename[Max]="c:\Text1.dat";
char text[Max]="c:\Text1.dat";
void CreateText(void);
}
void CreateText(char filename[],char text[])
{
char Text1;
ofstream Text1_file;
Text1_file.open(filename);
cout<<" Enter the Title of the File.";
Text1<<text;
cout<<" Enter the Text of the File.";
Text1<<text;
Text1.close();
return 0;
}