how can jou like in the folder \logs
from the program like
var="name".txt var="antwoord.txt
how can jou like in the folder \logs
from the program like
var="name".txt var="antwoord.txt
if x == y , y == x
Get a good book on C++ programming.
Or read the Tutorial.
gg
Using file streams:
Code:ofstream WriteFile; WriteFile.open("MyFile.txt", ios::out); if(!WriteFile.fail()) { WriteFile << "Hello notepad!" << endl; WriteFile.close(); }
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
but how to do it to a file thst the user write's
u would write n create the file in notepad then:
that what you mean?Code:ifstream infile; char ch; infile.open("somefile.txt"); infile.get(ch); while (! infile.fail()) { cout << ch << endl; infile.get(ch) }
To let the user decide which file? (actually, I'm having a little trouble understanding what you mean).Originally posted by gamer
but how to do it to a file thst the user write's
Use cin so the user can enter a filename:
Code:char FileName[64]; cout << "Enter a filename: "; cin >> FileName; WriteFile.open(FileName, ios::out | ios::trunc); etc...
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
thank's
it's that my mom is a teacher
and the don't have software
for math and stuff
zo if you ask there name and write a file to
it the teacher can look at it
zo iam on my way to make a program as this
if x == y , y == x
I have a fairly good understanding of c++ and i speak dutch, as it seems you have problems with englich feel free to e-mail me with future questions at [email protected] =]