LoginSignup
6
6

More than 5 years have passed since last update.

C言語で現在実行している関数名、行数を取得する

Last updated at Posted at 2016-08-24
const char *kansuumei = __func__;

こんな感じでおっけ

同じように

int gyousuu = __LINE__;

で行数を取得できる

注意点

  • 現在実行している関数名を取得する関数とか作っちゃだめだよ。
6
6
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6