libMesh
Functions
getpot_parse.C File Reference

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 27 of file getpot_parse.C.

28 {
29  using namespace libMesh;
30 
31  if (argc < 2)
32  libmesh_error_msg("Usage: " << argv[0] << " inputconfigfile [outputconfigfile]");
33 
34  GetPot gp(argv[1]);
35 
36  std::ostream *my_out;
37  std::ofstream fout;
38  fout.exceptions ( std::ofstream::failbit | std::ofstream::badbit );
39 
40  if (argc < 3)
41  my_out = &std::cout;
42  else
43  {
44  fout.open(argv[2]);
45  my_out = &fout;
46  }
47 
48  gp.print("", *my_out, 1);
49 }
The libMesh namespace provides an interface to certain functionality in the library.