仅提供English版本
When using the count(const) algorithm in STL, an error operator not found which takes a left operand of type 'const _Ty' occurred.
The reason is that the custom doubly linked list class did not overload the left operator ==. Adding the overload operation fixes it.
Author: Broccoli
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles
2022-06-10
C++ 检测程序是否在运行
参考材料: Find process ID by name and inject to it. Simple C++ example.C++通过进程名获取进程句柄 函数原因主要是为了服务自动更新的函数,在检测到程序退出后执行后续函数。 使用第二个引用的时候报错,发现是for循环堆栈溢出,应该是字段判定函数的问题,导致每个程序的名称都判定正确,建议采取第一个网址中的内容。 code: 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667#pragma once#include <TlHelp32.h>class CheckApplication{public: CheckApplication();private: HANDLE getProcessHandle();public: int IsExit();private: const char* _Name ...

2020-12-31
C++ Virtual Inheritance
I used to study C++ for a while, but never found a suitable project to get familiar with it. So I am learning C++ following an open source project on github, address: github 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647/* * Virtual Inheritance * Concept: Solves the data inconsistency problem caused by different copies of the same data member inherited from different paths in memory. * Set the common base class as a virtual base class. * At this time, t...
2020-12-02
C++ Get all files in a folder and rename to Hex
Reference Links:https://blog.csdn.net/u012500825/article/details/41947013C++ char, string to hex (supports Chinese string conversion) 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071// ConsoleApplication1.cpp : This file contains the "main" function. Program execution begins and ends here.//#include <iostream>#include <string>#include <io.h>#include <sstream>std::string chToH...
2020-06-14
C++ Primer & PrimerPlus Notes
OneSaw a case in C++ primerplus Chapter 6 Branching Statements, 12345678910111213141516171819202122232425262728293031 char ch; cout << "Typr , and I shell repeat.\n"; cin.get(ch); while (ch != '.') { if (ch == '\n') cout << ch; else cout << ch +1; cin.get(ch); } cout << "\n Please excuse thr slight confusion.\n";``` When we replace `cout<<ch+1` with `cout<<++ch`, two different results appear:- ch+1
2021-05-09
Use C++ for Revit Secondary Development
Since VC++ is compiled in CLR, it cannot achieve encryption effect. If you want to protect your code, it is recommended to use C++ for core algorithms and C# for interaction. While making component library, considering database connection code might be decompiled, I used WCF to interact with server data in previous version, articles can be found in my previous posts. But recently learning QT and trying to use QT+C++ or VC++ development to see effect, so simply wrote a demo developed by c++.R...
Announcement
欢迎访问!右上角可切换中英文。感谢您的阅读!



