I just open the c++ and then in the file tab, i select the source file in the new
or in other word just use ctrl + n(hotkey) and after this i paste this code. Does this code still usable? I know the...
Type: Posts; User: heitohell
I just open the c++ and then in the file tab, i select the source file in the new
or in other word just use ctrl + n(hotkey) and after this i paste this code. Does this code still usable? I know the...
Ok, now i saw a code like this:
#include <stdio.h>
#include <iostream>
using namespace std;
int main ()
Do you mean this code:
f you want to open the file and do something with it in your c++ program, using ofstream and ifstream as the code you've provided.
or this:
a_file.close();
Yea, thanks w.chen. But if i want to open the output file when i type open, does that possible?
cin>> op ;
if ( op == "open" ) {
cout<<"this is to test weather the code right ..." ;
}
the error didn't come out again but the message didn't show up even i type open.
I also tried that, but i don't know to check weather the user type open to open the file. I tried this:
char op[6] ;//i put this after using namespace std;...
Hello, I am a beginner. I read this page already, but just one things that I don't understand. How to open the example.txt when i type open? And the code below is the whole code.
#include...