conf_clear.cc 478 B

123456789101112131415161718192021222324
  1. #include <apt-pkg/configuration.h>
  2. #include <apt-pkg/error.h>
  3. using namespace std;
  4. int main(int argc,const char *argv[])
  5. {
  6. Configuration Cnf;
  7. cout << "adding elements" << endl;
  8. Cnf.Set("APT::Keep-Fds::",28);
  9. Cnf.Set("APT::Keep-Fds::",17);
  10. Cnf.Set("APT::Keep-Fds::",47);
  11. Cnf.Dump();
  12. cout << "Removing elements" << endl;
  13. Cnf.Clear("APT::Keep-Fds",17);
  14. Cnf.Clear("APT::Keep-Fds",28);
  15. Cnf.Clear("APT::Keep-Fds",47);
  16. Cnf.Dump();
  17. return 0;
  18. }