__LINE__, __FUNCTION__, __FILE__

VS2013下测试

// conselTest.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include <stdio.h>


int _tmain(int argc, _TCHAR* argv[])
{
    printf_s("行号:%d
函数名:%s
文件名:%s
", __LINE__, __FUNCTION__, __FILE__);
    //wprintf_s(L"行:%d
函数名:%S
文件名:%S
", __LINE__, __FUNCTION__, __FILE__);
    
    getchar();
    return 0;
}

原文地址:https://www.cnblogs.com/Lthis/p/4360855.html