• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
返回主页

TheSorry

  • 博客园
  • 首页
  • 新随笔
  • 联系
  • 订阅
  • 管理

vscode不好好打印typeid

头文件:#include <cxxabi.h> //使用abi
cout<<abi::__cxa_demangle(typeid(a).name(),0,0,0)<<endl;

https://zhidao.baidu.com/question/141654611677251165.html#:~:text=gcc就是那样的,只输出类型名的第一个字符,要输出完整的名字可以这样: %23include <iostream> %23include <typeinfo> %23include <cxxabi.h> %2F%2F使用abi,using namespace std%3B int main() cout<<abi%3A%3A__cxa_demangle(typeid(int).name()%2C0%2C0%2C0)<<endl%3B return 0%3B

posted @ 2023-09-06 22:27  TheSorry  阅读(12)  评论(0)    收藏  举报
刷新页面返回顶部

公告

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3