i'm new in c++ programming
posted by RobcQuote:
Code:int main()
{
char m[20];
fstream file("c:\\test\\test.txt",ios::ate | ios::out | ios::in )
/* i want a function to create test if doesn't exist */
get(m)
file << m;
file.close();
sorry about my english because i unse a translator
Quote:
writing or update then a nonexistent file is created if possible. That means if you use ios_base::out at all in the mode and the file doesn't exist, the program will attempt to create it.