src/linux_parser.cpp
int LinuxParser::TotalProcesses() {
  int val;
  string key, value, line;
  std::ifstream stream(kProcDirectory + kStatFilename);
  if (stream.is_open()) {
    while (std::getline(stream, line)){
      std::istringstream linestream(line);
      while (linestream >> key >> value) {
        if (key == "processes") { 
          val = std::stoi(value);
          return val;
        }
      }
    }
  }
  return 0;
}
// TODO: Read and return the total number of processes
Read and return the total number of processes
Read and return the total number of processes
int LinuxParser::TotalProcesses() {
  int val;
  string key, value, line;
  std::ifstream stream(kProcDirectory + kStatFilename);
  if (stream.is_open()) {
    while (std::getline(stream, line)){
      std::istringstream linestream(line);
      while (linestream >> key >> value) {
        if (key == "processes") { 
          val = std::stoi(value);
          return val;
        }
      }
    }
  }
  return 0;
}
int LinuxParser :: TotalProcesses ( ) { int val ; string key , value , line ; std :: ifstream stream ( kProcDirectory + kStatFilename ) ; if ( stream . is_open ( ) ) { while ( std :: getline ( stream , line ) ) { std :: istringstream linestream ( line ) ; while ( linestream >> key >> value ) { if ( key == " " ) { val = std :: stoi ( value ) ; return val ; } } } } return 0 ; }
TODO: Read and return the total number of processes
TODO : Read and return the total number of processes