Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

alloctest.cpp

By: a guest on Aug 28th, 2011  |  syntax: C++  |  size: 0.41 KB  |  views: 46  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. int main(int argc, char **argv)
  5. {
  6.         std::ifstream fs(argv[1]);
  7.         #ifdef TYPE_A
  8.         std::string line;
  9.         #endif
  10.         while(true)
  11.         {
  12.                 #ifdef TYPE_B
  13.                 std::string line;
  14.                 #endif
  15.                 if(!std::getline(fs, line)) break;
  16.                 std::cout << line << std::endl;
  17.         }
  18. }