爆款云主机2核4G限时秒杀,88元/年起!
查看详情

活动

天翼云最新优惠活动,涵盖免费试用,产品折扣等,助您降本增效!
热门活动
  • 618智算钜惠季 爆款云主机2核4G限时秒杀,88元/年起!
  • 免费体验DeepSeek,上天翼云息壤 NEW 新老用户均可免费体验2500万Tokens,限时两周
  • 云上钜惠 HOT 爆款云主机全场特惠,更有万元锦鲤券等你来领!
  • 算力套餐 HOT 让算力触手可及
  • 天翼云脑AOne NEW 连接、保护、办公,All-in-One!
  • 中小企业应用上云专场 产品组合下单即享折上9折起,助力企业快速上云
  • 息壤高校钜惠活动 NEW 天翼云息壤杯高校AI大赛,数款产品享受线上订购超值特惠
  • 天翼云电脑专场 HOT 移动办公新选择,爆款4核8G畅享1年3.5折起,快来抢购!
  • 天翼云奖励推广计划 加入成为云推官,推荐新用户注册下单得现金奖励
免费活动
  • 免费试用中心 HOT 多款云产品免费试用,快来开启云上之旅
  • 天翼云用户体验官 NEW 您的洞察,重塑科技边界

智算服务

打造统一的产品能力,实现算网调度、训练推理、技术架构、资源管理一体化智算服务
智算云(DeepSeek专区)
科研助手
  • 算力商城
  • 应用商城
  • 开发机
  • 并行计算
算力互联调度平台
  • 应用市场
  • 算力市场
  • 算力调度推荐
一站式智算服务平台
  • 模型广场
  • 体验中心
  • 服务接入
智算一体机
  • 智算一体机
大模型
  • DeepSeek-R1-昇腾版(671B)
  • DeepSeek-R1-英伟达版(671B)
  • DeepSeek-V3-昇腾版(671B)
  • DeepSeek-R1-Distill-Llama-70B
  • DeepSeek-R1-Distill-Qwen-32B
  • Qwen2-72B-Instruct
  • StableDiffusion-V2.1
  • TeleChat-12B

应用商城

天翼云精选行业优秀合作伙伴及千余款商品,提供一站式云上应用服务
进入甄选商城进入云市场创新解决方案
办公协同
  • WPS云文档
  • 安全邮箱
  • EMM手机管家
  • 智能商业平台
财务管理
  • 工资条
  • 税务风控云
企业应用
  • 翼信息化运维服务
  • 翼视频云归档解决方案
工业能源
  • 智慧工厂_生产流程管理解决方案
  • 智慧工地
建站工具
  • SSL证书
  • 新域名服务
网络工具
  • 翼云加速
灾备迁移
  • 云管家2.0
  • 翼备份
资源管理
  • 全栈混合云敏捷版(软件)
  • 全栈混合云敏捷版(一体机)
行业应用
  • 翼电子教室
  • 翼智慧显示一体化解决方案

合作伙伴

天翼云携手合作伙伴,共创云上生态,合作共赢
天翼云生态合作中心
  • 天翼云生态合作中心
天翼云渠道合作伙伴
  • 天翼云代理渠道合作伙伴
天翼云服务合作伙伴
  • 天翼云集成商交付能力认证
天翼云应用合作伙伴
  • 天翼云云市场合作伙伴
  • 天翼云甄选商城合作伙伴
天翼云技术合作伙伴
  • 天翼云OpenAPI中心
  • 天翼云EasyCoding平台
天翼云培训认证
  • 天翼云学堂
  • 天翼云市场商学院
天翼云合作计划
  • 云汇计划
天翼云东升计划
  • 适配中心
  • 东升计划
  • 适配互认证

开发者

开发者相关功能入口汇聚
技术社区
  • 专栏文章
  • 互动问答
  • 技术视频
资源与工具
  • OpenAPI中心
开放能力
  • EasyCoding敏捷开发平台
培训与认证
  • 天翼云学堂
  • 天翼云认证
魔乐社区
  • 魔乐社区

支持与服务

为您提供全方位支持与服务,全流程技术保障,助您轻松上云,安全无忧
文档与工具
  • 文档中心
  • 新手上云
  • 自助服务
  • OpenAPI中心
定价
  • 价格计算器
  • 定价策略
基础服务
  • 售前咨询
  • 在线支持
  • 在线支持
  • 工单服务
  • 建议与反馈
  • 用户体验官
  • 服务保障
  • 客户公告
  • 会员中心
增值服务
  • 红心服务
  • 首保服务
  • 客户支持计划
  • 专家技术服务
  • 备案管家

了解天翼云

天翼云秉承央企使命,致力于成为数字经济主力军,投身科技强国伟大事业,为用户提供安全、普惠云服务
品牌介绍
  • 关于天翼云
  • 智算云
  • 天翼云4.0
  • 新闻资讯
  • 天翼云APP
基础设施
  • 全球基础设施
  • 信任中心
最佳实践
  • 精选案例
  • 超级探访
  • 云杂志
  • 分析师和白皮书
  • 天翼云·创新直播间
市场活动
  • 2025智能云生态大会
  • 2024智算云生态大会
  • 2023云生态大会
  • 2022云生态大会
  • 天翼云中国行
天翼云
  • 活动
  • 智算服务
  • 产品
  • 解决方案
  • 应用商城
  • 合作伙伴
  • 开发者
  • 支持与服务
  • 了解天翼云
      • 文档
      • 控制中心
      • 备案
      • 管理中心

      gdb 查看c++中stl的内容

      首页 知识中心 其他 文章详情页

      gdb 查看c++中stl的内容

      2023-08-07 07:22:24 阅读次数:422

      c++,gdb

      将以下内容,存入  ~/.gdbinit 文件,然后在stl的容器上加p ,例如 pvector 

      #                                                                                                        
      # STL GDB evaluators/views/utilities - 1.03
      #
      # The new GDB commands:
      # are entirely non instrumental
      # do not depend on any "inline"(s) - e.g. size(), [], etc
      # are extremely tolerant to debugger settings
      #
      # This file should be "included" in .gdbinit as following:
      # source stl-views.gdb or just paste it into your .gdbinit file
      #
      # The following STL containers are currently supported:
      #
      # std::vector<T> -- via pvector command
      # std::list<T> -- via plist or plist_member command
      # std::map<T,T> -- via pmap or pmap_member command
      # std::multimap<T,T> -- via pmap or pmap_member command
      # std::set<T> -- via pset command
      # std::multiset<T> -- via pset command
      # std::deque<T> -- via pdequeue command
      # std::stack<T> -- via pstack command
      # std::queue<T> -- via pqueue command
      # std::priority_queue<T> -- via ppqueue command
      # std::bitset<n> -- via pbitset command
      # std::string -- via pstring command
      # std::widestring -- via pwstring command
      #
      # The end of this file contains (optional) C++ beautifiers
      # Make sure your debugger supports $argc
      #
      # Simple GDB Macros writen by Dan Marinescu (H-PhD) - License GPL
      # Inspired by intial work of Tom Malnar,
      # Tony Novac (PhD) / Cornell / Stanford,
      # Gilad Mishne (PhD) and Many Many Others.
      # Contact: dan_c_marinescu@yahoo.com (Subject: STL)
      #
      # Modified to work with g++ 4.3 by Anders Elton
      # Also added _member functions, that instead of printing the entire class in map, prints a member.



      #
      # std::vector<>
      #

      define pvector
      if $argc == 0
      help pvector
      else
      set $size = $arg0._M_impl._M_finish - $arg0._M_impl._M_start
      set $capacity = $arg0._M_impl._M_end_of_storage - $arg0._M_impl._M_start
      set $size_max = $size - 1
      end
      if $argc == 1
      set $i = 0
      while $i < $size
      printf "elem[%u]: ", $i
      p *($arg0._M_impl._M_start + $i)
      set $i++
      end
      end
      if $argc == 2
      set $idx = $arg1
      if $idx < 0 || $idx > $size_max
      printf "idx1, idx2 are not in acceptable range: [0..%u].\n", $size_max
      else
      printf "elem[%u]: ", $idx
      p *($arg0._M_impl._M_start + $idx)
      end
      end
      if $argc == 3
      set $start_idx = $arg1
      set $stop_idx = $arg2
      if $start_idx > $stop_idx
      set $tmp_idx = $start_idx
      set $start_idx = $stop_idx
      set $stop_idx = $tmp_idx
      end
      if $start_idx < 0 || $stop_idx < 0 || $start_idx > $size_max || $stop_idx > $size_max
      printf "idx1, idx2 are not in acceptable range: [0..%u].\n", $size_max
      else
      set $i = $start_idx
      while $i <= $stop_idx
      printf "elem[%u]: ", $i
      p *($arg0._M_impl._M_start + $i)
      set $i++
      end
      end
      end
      if $argc > 0
      printf "Vector size = %u\n", $size
      printf "Vector capacity = %u\n", $capacity
      printf "Element "
      whatis $arg0._M_impl._M_start
      end
      end

      document pvector
      Prints std::vector<T> information.
      Syntax: pvector <vector> <idx1> <idx2>
      Note: idx, idx1 and idx2 must be in acceptable range [0..<vector>.size()-1].
      Examples:
      pvector v - Prints vector content, size, capacity and T typedef
      pvector v 0 - Prints element[idx] from vector
      pvector v 1 2 - Prints elements in range [idx1..idx2] from vector
      end

      #
      # std::list<>
      #

      define plist
      if $argc == 0
      help plist
      else
      set $head = &$arg0._M_impl._M_node
      set $current = $arg0._M_impl._M_node._M_next
      set $size = 0
      while $current != $head
      if $argc == 2
      printf "elem[%u]: ", $size
      p *($arg1*)($current + 1)
      end
      if $argc == 3
      if $size == $arg2
      printf "elem[%u]: ", $size
      p *($arg1*)($current + 1)
      end
      end
      set $current = $current._M_next
      set $size++
      end
      printf "List size = %u \n", $size
      if $argc == 1
      printf "List "
      whatis $arg0
      printf "Use plist <variable_name> <element_type> to see the elements in the list.\n"
      end
      end
      end

      document plist
      Prints std::list<T> information.
      Syntax: plist <list> <T> <idx>: Prints list size, if T defined all elements or just element at idx
      Examples:
      plist l - prints list size and definition
      plist l int - prints all elements and list size
      plist l int 2 - prints the third element in the list (if exists) and list size
      end

      define plist_member
      if $argc == 0
      help plist_member
      else
      set $head = &$arg0._M_impl._M_node
      set $current = $arg0._M_impl._M_node._M_next
      set $size = 0
      while $current != $head
      if $argc == 3
      printf "elem[%u]: ", $size
      p (*($arg1*)($current + 1)).$arg2
      end
      if $argc == 4
      if $size == $arg3
      printf "elem[%u]: ", $size
      p (*($arg1*)($current + 1)).$arg2
      end
      end
      set $current = $current._M_next
      set $size++
      end
      printf "List size = %u \n", $size
      if $argc == 1
      printf "List "
      whatis $arg0
      printf "Use plist_member <variable_name> <element_type> <member> to see the elements in the list.\n"
      end
      end
      end

      document plist_member
      Prints std::list<T> information.
      Syntax: plist <list> <T> <idx>: Prints list size, if T defined all elements or just element at idx
      Examples:
      plist_member l int member - prints all elements and list size
      plist_member l int member 2 - prints the third element in the list (if exists) and list size
      end


      #
      # std::map and std::multimap
      #

      define pmap
      if $argc == 0
      help pmap
      else
      set $tree = $arg0
      set $i = 0
      set $node = $tree._M_t._M_impl._M_header._M_left
      set $end = $tree._M_t._M_impl._M_header
      set $tree_size = $tree._M_t._M_impl._M_node_count
      if $argc == 1
      printf "Map "
      whatis $tree
      printf "Use pmap <variable_name> <left_element_type> <right_element_type> to see the elements in the map.\n"
      end
      if $argc == 3
      while $i < $tree_size
      set $value = (void *)($node + 1)
      printf "elem[%u].left: ", $i
      p *($arg1*)$value
      set $value = $value + sizeof($arg1)
      printf "elem[%u].right: ", $i
      p *($arg2*)$value
      if $node._M_right != 0
      set $node = $node._M_right
      while $node._M_left != 0
      set $node = $node._M_left
      end
      else
      set $tmp_node = $node._M_parent
      while $node == $tmp_node._M_right
      set $node = $tmp_node
      set $tmp_node = $tmp_node._M_parent
      end
      if $node._M_right != $tmp_node
      set $node = $tmp_node
      end
      end
      set $i++
      end
      end
      if $argc == 4
      set $idx = $arg3
      set $ElementsFound = 0
      while $i < $tree_size
      set $value = (void *)($node + 1)
      if *($arg1*)$value == $idx
      printf "elem[%u].left: ", $i
      p *($arg1*)$value
      set $value = $value + sizeof($arg1)
      printf "elem[%u].right: ", $i
      p *($arg2*)$value
      set $ElementsFound++
      end
      if $node._M_right != 0
      set $node = $node._M_right
      while $node._M_left != 0
      set $node = $node._M_left
      end
      else
      set $tmp_node = $node._M_parent
      while $node == $tmp_node._M_right
      set $node = $tmp_node
      set $tmp_node = $tmp_node._M_parent
      end
      if $node._M_right != $tmp_node
      set $node = $tmp_node
      end
      end
      set $i++
      end
      printf "Number of elements found = %u\n", $ElementsFound
      end
      if $argc == 5
      set $idx1 = $arg3
      set $idx2 = $arg4
      set $ElementsFound = 0
      while $i < $tree_size
      set $value = (void *)($node + 1)
      set $valueLeft = *($arg1*)$value
      set $valueRight = *($arg2*)($value + sizeof($arg1))
      if $valueLeft == $idx1 && $valueRight == $idx2
      printf "elem[%u].left: ", $i
      p $valueLeft
      printf "elem[%u].right: ", $i
      p $valueRight
      set $ElementsFound++
      end
      if $node._M_right != 0
      set $node = $node._M_right
      while $node._M_left != 0
      set $node = $node._M_left
      end
      else
      set $tmp_node = $node._M_parent
      while $node == $tmp_node._M_right
      set $node = $tmp_node
      set $tmp_node = $tmp_node._M_parent
      end
      if $node._M_right != $tmp_node
      set $node = $tmp_node
      end
      end
      set $i++
      end
      printf "Number of elements found = %u\n", $ElementsFound
      end
      printf "Map size = %u\n", $tree_size
      end
      end

      document pmap
      Prints std::map<TLeft and TRight> or std::multimap<TLeft and TRight> information. Works for std::multimap as well.
      Syntax: pmap <map> <TtypeLeft> <TypeRight> <valLeft> <valRight>: Prints map size, if T defined all elements or just element(s) with val(s)
      Examples:
      pmap m - prints map size and definition
      pmap m int int - prints all elements and map size
      pmap m int int 20 - prints the element(s) with left-value = 20 (if any) and map size
      pmap m int int 20 200 - prints the element(s) with left-value = 20 and right-value = 200 (if any) and map size
      end


      define pmap_member
      if $argc == 0
      help pmap_member
      else
      set $tree = $arg0
      set $i = 0
      set $node = $tree._M_t._M_impl._M_header._M_left
      set $end = $tree._M_t._M_impl._M_header
      set $tree_size = $tree._M_t._M_impl._M_node_count
      if $argc == 1
      printf "Map "
      whatis $tree
      printf "Use pmap <variable_name> <left_element_type> <right_element_type> to see the elements in the map.\n"
      end
      if $argc == 5
      while $i < $tree_size
      set $value = (void *)($node + 1)
      printf "elem[%u].left: ", $i
      p (*($arg1*)$value).$arg2
      set $value = $value + sizeof($arg1)
      printf "elem[%u].right: ", $i
      p (*($arg3*)$value).$arg4
      if $node._M_right != 0
      set $node = $node._M_right
      while $node._M_left != 0
      set $node = $node._M_left
      end
      else
      set $tmp_node = $node._M_parent
      while $node == $tmp_node._M_right
      set $node = $tmp_node
      set $tmp_node = $tmp_node._M_parent
      end
      if $node._M_right != $tmp_node
      set $node = $tmp_node
      end
      end
      set $i++
      end
      end
      if $argc == 6
      set $idx = $arg5
      set $ElementsFound = 0
      while $i < $tree_size
      set $value = (void *)($node + 1)
      if *($arg1*)$value == $idx
      printf "elem[%u].left: ", $i
      p (*($arg1*)$value).$arg2
      set $value = $value + sizeof($arg1)
      printf "elem[%u].right: ", $i
      p (*($arg3*)$value).$arg4
      set $ElementsFound++
      end
      if $node._M_right != 0
      set $node = $node._M_right
      while $node._M_left != 0
      set $node = $node._M_left
      end
      else
      set $tmp_node = $node._M_parent
      while $node == $tmp_node._M_right
      set $node = $tmp_node
      set $tmp_node = $tmp_node._M_parent
      end
      if $node._M_right != $tmp_node
      set $node = $tmp_node
      end
      end
      set $i++
      end
      printf "Number of elements found = %u\n", $ElementsFound
      end
      printf "Map size = %u\n", $tree_size
      end
      end

      document pmap_member
      Prints std::map<TLeft and TRight> or std::multimap<TLeft and TRight> information. Works for std::multimap as well.
      Syntax: pmap <map> <TtypeLeft> <TypeRight> <valLeft> <valRight>: Prints map size, if T defined all elements or just element(s) with val(s)
      Examples:
      pmap_member m class1 member1 class2 member2 - prints class1.member1 : class2.member2
      pmap_member m class1 member1 class2 member2 lvalue - prints class1.member1 : class2.member2 where class1 == lvalue
      end


      #
      # std::set and std::multiset
      #

      define pset
      if $argc == 0
      help pset
      else
      set $tree = $arg0
      set $i = 0
      set $node = $tree._M_t._M_impl._M_header._M_left
      set $end = $tree._M_t._M_impl._M_header
      set $tree_size = $tree._M_t._M_impl._M_node_count
      if $argc == 1
      printf "Set "
      whatis $tree
      printf "Use pset <variable_name> <element_type> to see the elements in the set.\n"
      end
      if $argc == 2
      while $i < $tree_size
      set $value = (void *)($node + 1)
      printf "elem[%u]: ", $i
      p *($arg1*)$value
      if $node._M_right != 0
      set $node = $node._M_right
      while $node._M_left != 0
      set $node = $node._M_left
      end
      else
      set $tmp_node = $node._M_parent
      while $node == $tmp_node._M_right
      set $node = $tmp_node
      set $tmp_node = $tmp_node._M_parent
      end
      if $node._M_right != $tmp_node
      set $node = $tmp_node
      end
      end
      set $i++
      end
      end
      if $argc == 3
      set $idx = $arg2
      set $ElementsFound = 0
      while $i < $tree_size
      set $value = (void *)($node + 1)
      if *($arg1*)$value == $idx
      printf "elem[%u]: ", $i
      p *($arg1*)$value
      set $ElementsFound++
      end
      if $node._M_right != 0
      set $node = $node._M_right
      while $node._M_left != 0
      set $node = $node._M_left
      end
      else
      set $tmp_node = $node._M_parent
      while $node == $tmp_node._M_right
      set $node = $tmp_node
      set $tmp_node = $tmp_node._M_parent
      end
      if $node._M_right != $tmp_node
      set $node = $tmp_node
      end
      end
      set $i++
      end
      printf "Number of elements found = %u\n", $ElementsFound
      end
      printf "Set size = %u\n", $tree_size
      end
      end

      document pset
      Prints std::set<T> or std::multiset<T> information. Works for std::multiset as well.
      Syntax: pset <set> <T> <val>: Prints set size, if T defined all elements or just element(s) having val
      Examples:
      pset s - prints set size and definition
      pset s int - prints all elements and the size of s
      pset s int 20 - prints the element(s) with value = 20 (if any) and the size of s
      end



      #
      # std::dequeue
      #

      define pdequeue
      if $argc == 0
      help pdequeue
      else
      set $size = 0
      set $start_cur = $arg0._M_impl._M_start._M_cur
      set $start_last = $arg0._M_impl._M_start._M_last
      set $start_stop = $start_last
      while $start_cur != $start_stop
      p *$start_cur
      set $start_cur++
      set $size++
      end
      set $finish_first = $arg0._M_impl._M_finish._M_first
      set $finish_cur = $arg0._M_impl._M_finish._M_cur
      set $finish_last = $arg0._M_impl._M_finish._M_last
      if $finish_cur < $finish_last
      set $finish_stop = $finish_cur
      else
      set $finish_stop = $finish_last
      end
      while $finish_first != $finish_stop
      p *$finish_first
      set $finish_first++
      set $size++
      end
      printf "Dequeue size = %u\n", $size
      end
      end

      document pdequeue
      Prints std::dequeue<T> information.
      Syntax: pdequeue <dequeue>: Prints dequeue size, if T defined all elements
      Deque elements are listed "left to right" (left-most stands for front and right-most stands for back)
      Example:
      pdequeue d - prints all elements and size of d
      end



      #
      # std::stack
      #

      define pstack
      if $argc == 0
      help pstack
      else
      set $start_cur = $arg0.c._M_impl._M_start._M_cur
      set $finish_cur = $arg0.c._M_impl._M_finish._M_cur
      set $size = $finish_cur - $start_cur
      set $i = $size - 1
      while $i >= 0
      p *($start_cur + $i)
      set $i--
      end
      printf "Stack size = %u\n", $size
      end
      end

      document pstack
      Prints std::stack<T> information.
      Syntax: pstack <stack>: Prints all elements and size of the stack
      Stack elements are listed "top to buttom" (top-most element is the first to come on pop)
      Example:
      pstack s - prints all elements and the size of s
      end



      #
      # std::queue
      #

      define pqueue
      if $argc == 0
      help pqueue
      else
      set $start_cur = $arg0.c._M_impl._M_start._M_cur
      set $finish_cur = $arg0.c._M_impl._M_finish._M_cur
      set $size = $finish_cur - $start_cur
      set $i = 0
      while $i < $size
      p *($start_cur + $i)
      set $i++
      end
      printf "Queue size = %u\n", $size
      end
      end

      document pqueue
      Prints std::queue<T> information.
      Syntax: pqueue <queue>: Prints all elements and the size of the queue
      Queue elements are listed "top to bottom" (top-most element is the first to come on pop)
      Example:
      pqueue q - prints all elements and the size of q
      end



      #
      # std::priority_queue
      #

      define ppqueue
      if $argc == 0
      help ppqueue
      else
      set $size = $arg0.c._M_impl._M_finish - $arg0.c._M_impl._M_start
      set $capacity = $arg0.c._M_impl._M_end_of_storage - $arg0.c._M_impl._M_start
      set $i = $size - 1
      while $i >= 0
      p *($arg0.c._M_impl._M_start + $i)
      set $i--
      end
      printf "Priority queue size = %u\n", $size
      printf "Priority queue capacity = %u\n", $capacity
      end
      end

      document ppqueue
      Prints std::priority_queue<T> information.
      Syntax: ppqueue <priority_queue>: Prints all elements, size and capacity of the priority_queue
      Priority_queue elements are listed "top to buttom" (top-most element is the first to come on pop)
      Example:
      ppqueue pq - prints all elements, size and capacity of pq
      end



      #
      # std::bitset
      #

      define pbitset
      if $argc == 0
      help pbitset
      else
      p /t $arg0._M_w
      end
      end

      document pbitset
      Prints std::bitset<n> information.
      Syntax: pbitset <bitset>: Prints all bits in bitset
      Example:
      pbitset b - prints all bits in b
      end



      #
      # std::string
      #

      define pstring
      if $argc == 0
      help pstring
      else
      printf "String \t\t\t= \"%s\"\n", $arg0._M_data()
      printf "String size/length \t= %u\n", $arg0._M_rep()._M_length
      printf "String capacity \t= %u\n", $arg0._M_rep()._M_capacity
      printf "String ref-count \t= %d\n", $arg0._M_rep()._M_refcount
      end
      end

      document pstring
      Prints std::string information.
      Syntax: pstring <string>
      Example:
      pstring s - Prints content, size/length, capacity and ref-count of string s
      end

      #
      # std::wstring
      #

      define pwstring
      if $argc == 0
      help pwstring
      else
      call printf("WString \t\t= \"%ls\"\n", $arg0._M_data())
      printf "WString size/length \t= %u\n", $arg0._M_rep()._M_length
      printf "WString capacity \t= %u\n", $arg0._M_rep()._M_capacity
      printf "WString ref-count \t= %d\n", $arg0._M_rep()._M_refcount
      end
      end

      document pwstring
      Prints std::wstring information.
      Syntax: pwstring <wstring>
      Example:
      pwstring s - Prints content, size/length, capacity and ref-count of wstring s
      end

      #
      # C++ related beautifiers (optional)
      #

      set print pretty on
      set print object on
      set print static-members on
      set print vtbl on
      set print demangle on
      set demangle-style gnu-v3
      set print sevenbit-strings off
      版权声明:本文内容来自第三方投稿或授权转载,原文地址:https://blog.51cto.com/adofsauron/5644163,作者:帝尊悟世,版权归原作者所有。本网站转在其作品的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如因作品内容、版权等问题需要同本网站联系,请发邮件至ctyunbbs@chinatelecom.cn沟通。

      上一篇:js实现工厂模式

      下一篇:python使用zmq通信

      相关文章

      2025-05-19 09:04:53

      查看RISC-V版本的gcc中默认定义的宏

      查看RISC-V版本的gcc中默认定义的宏

      2025-05-19 09:04:53
      c++ , linux
      2025-04-14 09:26:51

      【算法入门08】青蛙跳台阶

      【算法入门08】青蛙跳台阶

      2025-04-14 09:26:51
      c++ , 动态规划 , 算法
      2025-04-14 09:26:51

      STL详解(九)—— priority_queue的使用与模拟实现

      优先级队列默认使用vector作为其底层存储数据的容器,在vector上又使用了堆算法将vector中的元素构造成堆的结构,因此priority_queue就是堆,所有需要用到堆的位置,都可以考虑使用priority_queue。

      2025-04-14 09:26:51
      c++ , stl , 数据结构
      2025-04-14 09:26:51

      STL详解(八)—— stack和queue的模拟实现

      stack和queue有一点需要注意的是,虽然stack和queue中也可以存放元素,但在STL中并没有将其划分在容器的行列,而是将其称为容器适配器,这是因为stack和queue只是对其他容器的接口进行了包装,STL中stack和queue默认使用deque容器。

      2025-04-14 09:26:51
      c++ , queue , stack , stl
      2025-04-14 09:24:23

      【算法入门14】二叉树的镜像

      【算法入门14】二叉树的镜像

      2025-04-14 09:24:23
      c++ , 算法
      2025-04-14 09:24:23

      【算法入门09】矩形覆盖

      【算法入门09】矩形覆盖

      2025-04-14 09:24:23
      c++ , 动态规划 , 算法
      2025-04-01 10:29:12

      golang与 C++数据结构类型对应关系是怎样的?

      uintptr和unsafe.Pointer相当于c++的void*,也就是任意指针。

      2025-04-01 10:29:12
      c++ , golang , 函数指针 , 数据结构
      2025-03-31 08:49:25

      MFC编程 -- 判断是否按下ctrl和shift键

      MFC编程 -- 判断是否按下ctrl和shift键

      2025-03-31 08:49:25
      c++ , mfc , 开发语言
      2025-03-31 08:48:59

      MFC编程 -- 读取文件内容

      MFC编程 -- 读取文件内容

      2025-03-31 08:48:59
      c++ , mfc
      2025-03-31 08:48:59

      MFC编程 -- 浮点数与字符串之间转换

      MFC编程 -- 浮点数与字符串之间转换

      2025-03-31 08:48:59
      c++ , mfc , 字符串 , 浮点数
      查看更多
      推荐标签

      作者介绍

      天翼云小翼
      天翼云用户

      文章

      33561

      阅读量

      5244545

      查看更多

      最新文章

      查看RISC-V版本的gcc中默认定义的宏

      2025-05-19 09:04:53

      STL详解(八)—— stack和queue的模拟实现

      2025-04-14 09:26:51

      【GDB】GDB工作原理--ptrace(让父进程可观察和控制其它进程、检查和改变其核心映像及寄存器)

      2025-02-28 09:27:44

      使用gcore生成当前崩溃进程生成dump文件并定位错误

      2024-12-24 10:19:43

      c++ return类对象与析构函数

      2024-10-24 08:42:05

      Windows平台里的grep——1.Borland grep

      2024-10-24 08:33:12

      查看更多

      热门文章

      E0144 “const char *“ 类型的值不能用于初始化 “char *“ 类型的实体

      2023-02-13 07:55:59

      c++rand()函数-产生随机数

      2023-04-07 06:38:52

      c++中的using namespace std;

      2023-03-01 09:55:46

      4.寻找两个正序数组的中位数 (困难)

      2023-02-13 07:53:15

      c++primer Plus 6 的课后题(第三章3.6)

      2023-02-13 07:58:38

      第7章 神奇的树

      2023-03-02 02:41:22

      查看更多

      热门标签

      linux java python javascript 数组 前端 docker Linux vue 函数 shell git 节点 容器 示例
      查看更多

      相关产品

      弹性云主机

      随时自助获取、弹性伸缩的云服务器资源

      天翼云电脑(公众版)

      便捷、安全、高效的云电脑服务

      对象存储

      高品质、低成本的云上存储服务

      云硬盘

      为云上计算资源提供持久性块存储

      查看更多

      随机文章

      ros实现地面过滤+欧式聚类(boundingbox)

      c++自由的转换string和number

      编译并使用protobuf完成c++序列化

      公交路线。

      1199. 保留整数

      移动语义和右值引用

      • 7*24小时售后
      • 无忧退款
      • 免费备案
      • 专家服务
      售前咨询热线
      400-810-9889转1
      关注天翼云
      • 旗舰店
      • 天翼云APP
      • 天翼云微信公众号
      服务与支持
      • 备案中心
      • 售前咨询
      • 智能客服
      • 自助服务
      • 工单管理
      • 客户公告
      • 涉诈举报
      账户管理
      • 管理中心
      • 订单管理
      • 余额管理
      • 发票管理
      • 充值汇款
      • 续费管理
      快速入口
      • 天翼云旗舰店
      • 文档中心
      • 最新活动
      • 免费试用
      • 信任中心
      • 天翼云学堂
      云网生态
      • 甄选商城
      • 渠道合作
      • 云市场合作
      了解天翼云
      • 关于天翼云
      • 天翼云APP
      • 服务案例
      • 新闻资讯
      • 联系我们
      热门产品
      • 云电脑
      • 弹性云主机
      • 云电脑政企版
      • 天翼云手机
      • 云数据库
      • 对象存储
      • 云硬盘
      • Web应用防火墙
      • 服务器安全卫士
      • CDN加速
      热门推荐
      • 云服务备份
      • 边缘安全加速平台
      • 全站加速
      • 安全加速
      • 云服务器
      • 云主机
      • 智能边缘云
      • 应用编排服务
      • 微服务引擎
      • 共享流量包
      更多推荐
      • web应用防火墙
      • 密钥管理
      • 等保咨询
      • 安全专区
      • 应用运维管理
      • 云日志服务
      • 文档数据库服务
      • 云搜索服务
      • 数据湖探索
      • 数据仓库服务
      友情链接
      • 中国电信集团
      • 189邮箱
      • 天翼企业云盘
      • 天翼云盘
      ©2025 天翼云科技有限公司版权所有 增值电信业务经营许可证A2.B1.B2-20090001
      公司地址:北京市东城区青龙胡同甲1号、3号2幢2层205-32室
      • 用户协议
      • 隐私政策
      • 个人信息保护
      • 法律声明
      备案 京公网安备11010802043424号 京ICP备 2021034386号