+ 1
How to add external file from pc in c++ code to use in programme?
i need this to have access of file from my pc during i am using my programme
2 Respostas
+ 2
use the std::fstream.
int main ()
{
std::fstream mystream;
mystream.open ("file.txt", std::ifstream::in);
}
that code simply opens a text file on your pc. you can use fstream to read and write on files
+ 2
thanks brendan it really works and now i am coding awesome programme it is very helpul