00001 #include <stdio.h>
00002 #include <vector>
00003 #include <string>
00004 #include <iostream>
00005 #include <fstream>
00006
00007 void readConfigFile(std::vector< std::string >* inputlines , std::string configfile){
00008 std::string line;
00009 std::ifstream myfile (configfile.c_str());
00010 if (myfile.is_open())
00011 {
00012
00013 while (! myfile.eof() )
00014 {
00015
00016 getline (myfile,line);
00017
00018
00019 if(line.find("#") != std::string::npos)
00020 line.replace(line.find("#"), line.length()-line.find("#"),"");
00021
00022
00023
00024
00025
00026 if(line.empty()) continue;
00027
00028
00029 inputlines->push_back(line);
00030 }
00031
00032 myfile.close();
00033 }
00034 else std::cout << "Unable to open file " << configfile << std::endl;
00035
00036 }
00037