跳到正文

闲话

Template Queue Header

Psq2416约 2 分钟
原文

这是 2026年3月2日 存档的第 6 版,不是当前版本。查看当前版本

文章信息与版本

文章信息

发布
2026年1月2日
收录
2026年1月17日
更新
2026年11月18日
篇幅
约 2 分钟

版本

  1. v8当前
  2. v7
  3. v6
  4. v5
更早的 4 个版本
  1. v4
  2. v3
  3. v2
  4. v1
C++
main.cpp: In function ‘int main()’:
main.cpp:7:7: error: ‘std::deque<int, std::allocator<int> > std::queue<int>::c’ is protected within this context
    7 |     q.c.push_back(1);
      |       ^
In file included from /usr/include/c++/13/queue:66,
                 from main.cpp:1:
/usr/include/c++/13/bits/stl_queue.h:153:17: note: declared protected here
  153 |       _Sequence c;
      |                 ^

tqh,tqh,模板队列 tqh,BFS 用 tqh,拓扑排序 tqh,单调队列 tqh,Dijk tqh,SPFA tqh,Prim tqh……


模板队列头文件,t-q-ueueueueueue……ueh!

s-t-d-func-tion is de-fined in hea-der func-tio-nal!

s-t-d-func-tion 它在 name-space t-q-ueh!


std::function 它在 namespace tqh
std::function 它在 namespace tqh
std::function 它在 namespace tqh
std::function 它在 namespace tqh
……

std::function 它在 namespace t-q-ue,ueueueueueueueueueueueueueueueueue……


t-q-u-e-h-h,i-t-o-p-h-h,u-sing name-space t-q-h,u-sing name-space t-q-h,func-tio-nal h-h,pro-grams h-h。s,and t-q-u-e-u-e-h,i-t-o-p func-tion;它在 name-space t-q-u-e-u-e-h,i-t-o-p func-tion……