Source

hello / c++ / where.cpp

#include <iostream>
#include <stdio.h>

using namespace std;

#define WHERE  {cout << __LINE__ << __FILE__ << endl; }

int main(){
  cout << "hoge __LINE__" << endl;
  WHERE
  perror("hoge");
  WHERE
}