View Single Post
Join Date: Oct 2006
Posts: 2,989
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 308
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Cenosillicaphobiac

Re: /etc/resolv.conf

 
0
  #2
Dec 2nd, 2008
The conf file is just a textfile, so you can use standard c++ file-acces:

  1. #include <fstream>
  2.  
  3. [....]
  4.  
  5. std::ifstream in_file("/etc/resolv.conf");
  6. if (!in_file.is_open())
  7. std::cout << "error opening file";
  8. else
  9. // do stuff
Reply With Quote