[ Back to the overview Matrix ]

Test case : Type "file" using C++

Lines used: 8
#include <iostream>
#include <fstream>

int main(int argc, char **argv) {
  std::ifstream in(argv[1]);
  char c;
  while (in.get(c))
    std::cout.put(c);
}
Contributed by Jeremy Yallop , jeremy at yallop.org