if no, can c++ change one file's extention from *.txt to *.bat??
if no, can c++ change one file's extention from *.txt to *.bat??
The file can be named whatever you like.
do you mean that i can use the command:
instead ofCode:ofstream fout("testing.bat")
??Code:ofstream fout("testing.txt")
Yeah, but why don't you just try it instead of asking?
i have tried that indeed but i am using visual C++.net in my office, i dun know why it do not support <iostream.h>....i will try that at home with c++ 6.0
thank you for your help anyway
Because it should be <iostream> - no .h - that is the old, depricated style.i dun know why it do not support <iostream.h>
i.e.
You should really be doing it this way in VC++ 6.0 anyway, as it supports this method of including the iostream header, as per the standard.Code:#include <iostream> int main(void) { std::cout << "this way is more correct" << std::endl; return 0; }
"Queen and huntress, chaste and fair,
Now the sun is laid to sleep,
Seated in thy silver chair,
State in wonted manner keep."
or the smarter method...Code:#include <iostream> using namespace std; int main(void) { cout << "bling!¿" << endl; return 0; }