Practical Guide to STL

C++二维vector不是二维数组:内存模型与实操指南 在C++中,vector<vector<T>>常被误认为等价于二维数组,但其本质是‘一维vector,每个元素为独立可变长vector’的嵌套结构。它不保证内存连续,支持锯齿状布局,具备行级动态扩容能力,适用于不确定规模、需频繁增删的场景。理解其底层内存分配(外层存指针、内层各自管理堆内存)、初始化契约(如vector<vector<int>>(R, vector<int>(C))触发R次独立构造)及访问语义([]无检查、at()带异常),是避免越界崩溃、深拷贝误用和性能陷阱的关键。本文聚焦初学者高频踩坑点 阅读详情
   
Introduction
STL (Standard Template Library) is a good skill for anyone programming C++ in the modern day. I must say that it takes some getting used to, i.e. there is a fairly steep learning curve, and some of the names that are used are not very intuitive (perhaps because all of the good names had been used up). The upside is once learned they will save you headaches down the road. Compared to MFC containers, they are more flexible and powerful.
Listed advantages:
Can sort and search easily
They are safer and easier to debug
You can understand code written by the UNIX crowd.
It is another acronym to add to your resume
Background
This guide has been written so that the reader can get a running start at this challenging part of computer science, without having to wade through the endless mass of jargon and stifling exactitude that STL'er have created for their own amusement.
Using the Code
The code here is mainly instructive on the practical ways to use STL.
Definitions
Template - A macro for classes (and structures and data types and functions). Sometimes called a cookie cutter. Also formally known as generic - a template of a class is called a generic class. A template of a function is called, wait for it, a generic function.
STL - Standard Template Library, templates written by a bunch of smart people, now used by everyone part of the C++ standard language.
Container - A class that holds data. STL examples are vectors, sets, maps, multimaps, and deques.
Vector - Your basic array template. It is a container.
Iterator - A fancy word for a pointer to an element inside an STL container. It does other stuff too.
Hello World Program
I always wanted to write one and here is my golden 24 karet opportunity: a hello world program. This transfers a char string into a vector of characters and then displays the string one character at a time. A vector is your basic garden variety array-like template. Probably, about half of all STL containers are vectors, so if you grasp this program, you are half way to a complete understanding of STL.
 Collapse
// Program: Vector Demo 1
// Purpose: To demonstrate STL vectors

// #include "stdafx.h" - include if you use pre compiled headers
#include <vector>  // STL vector header. There is no ".h"
#include <iostream>  // for cout
using namespace std;  // Ensure that the namespace is set to std

char* szHW = "Hello World"; 
// This is - as we all know - a character array,
// terminated with a null character

int main(int argc, char* argv[])
{
  vector <char> vec;  // A vector (STL array) of characters

  // Define an iterator for a vector of characters - this is always
  // scoped to within the template
  vector <char>::iterator vi;
  // Initialize the character vector, loop through the string,
  // placing the data in the vector character by character until
  // the terminating NULL is reached
  char* cptr = szHW;  // Start a pointer on the Hello World string
  while (*cptr != '/0')
  {  vec.push_back(*cptr);  cptr++;  }
  // push_back places the data on the back of the vector
  // (otherwise known as the end of the vector)

  // Print each character now stored in the STL array to the console
  for (vi=vec.begin(); vi!=vec.end(); vi++) 
  // This is your standard STL for loop - usually "!="
  // is used in stead of "<"
  // because "<" is not defined for some containers. begin()
  // and end() retrieve iterators
  // (pointers) to the beginning of the vector and to the end of vector
  {  cout << *vi;  }  // Use the indirection operator
           // (*) to extract the data from the iterator
  cout << endl;  // No more "/n"

  return 0;
}
push_back is the standard function for putting data into a vector or deque. insert is a similar function and does much the same, and works with all containers, but is more complicated. The end() is actually the end plus one, to allow the loop to operate properly - it actually points to the point just beyond the limits of the data. Just like in a regular loop in which you say for (i=0; i<6; i++) {ar[i] = i;} - ar[6] does not exist, but it is never reached in the loop so it does not matter.
STL Annoyance #1:
One of the first annoyances of STL makes itself known. To initialize it with data is more difficult than is the case in C/C++ arrays. You basically must do it element by element, or first initialize an array and then transfer it. People are working on this I understand.
 Collapse
// Program: Initialization Demo
// Purpose: To demonstrate initialization of STL vectors

#include <cstring>  // same as <string.h>
#include <vector>
using namespace std;
int ar[10] = {  12, 45, 234, 64, 12, 35, 63, 23, 12, 55  };
char* str = "Hello World";
int main(int argc, char* argv[])
{
  vector <int> vec1(ar, ar+10);
  vector <char> vec2(str, str+strlen(str));
  return 0;
}
In programming, there are many ways of doing the same task. Another way to fill a vector is to use the more familiar square brackets, like so:
 Collapse
// Program: Vector Demo 2
// Purpose: To demonstrate STL vectors with
// counters and square brackets

#include <cstring>
#include <vector>
#include <iostream>
using namespace std;
char* szHW = "Hello World";
int main(int argc, char* argv[])
{
  vector <char> vec(strlen(sHW));
  // The argument initializes the memory footprint
  int i, k = 0;
  char* cptr = szHW;
  while (*cptr != '/0')
  {  vec[k] = *cptr;  cptr++;  k++;  }
  for (i=0; i<vec.size(); i++)
  {  cout << vec[i];  }
  cout << endl;
  return 0;
}
This example is cleaner, but allows you less control of the iterator, and has an extra integer counter, and you must explicitly set the memory footprint.
Namespaces
Hand in hand with STL is the concept of Namespaces. STL is defined within the std namespace. There are 3 ways to specify it:
USE that namespace, near the top of all files, but below headers.
 Collapse
using namespace std;
This is the simplest and best for simple projects, limits you to the std namespace, anything you add is improperly put in the std namespace (I think you go to heck for doing this).
Specify each and every template before use (like prototyping)
 Collapse
using std::cout;
using std::endl;
using std::flush;
using std::set;
using std::inserter;
This is slightly more tedious, although a good mnemonic for the functions that will be used, and you can interlace other namespaces easily.
EVERY time you use a template from the std namespace, use the std scope specifier.
 Collapse
typedef std::vector<std::string> VEC_STR;
This is tedious but the best way if you are mixing and matching lots of namespaces. Some STL zealots will always use this and call anyone evil who does not. Some people will create macros to simplify matters.
In addition, you can put using namespace std within any scope, for example, at the top of a function or within a control loop.
Some Tips
To avoid an annoying error code in debug mode, use the following compiler pragma:
 Collapse
#pragma warning(disable: 4786)
Another gotcha is: you must make sure that the spaces are placed between your angle brackets and the name. This is because >> is the bit shift operator, so:
 Collapse
vector <list<int>> veclis;
will give an error. Instead, write it:
 Collapse
vector <list <int> > veclis;
to avoid compilation errors.
Another Container - The set
This is the explanation lifted from the MS help file of the set: "The template class describes an object that controls a varying-length sequence of elements of type const Key. Each element serves as both a sort key and a value. The sequence is represented in a way that permits lookup, insertion, and removal of an arbitrary element with a number of operations proportional to the logarithm of the number of elements in the sequence (logarithmic time). Moreover, inserting an element invalidates no iterators, and removing an element invalidates only those iterators that point at the removed element."
An alternate, more practical, definition is: A set is a container that contains all unique values. This is useful for cases in which you are required to collect the occurrence of value. It is sorted in an order that is specified at the instantiation of the set. If you need to store data with a key/value pair, then a map is a better choice. A set is organized as a linked list, is faster than a vector on insertion and removal, but slightly slower on search and addition to end.
An example program would be:
 Collapse
// Program: Set Demo
// Purpose: To demonstrate STL sets

#include <string>
#include <set>
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
  set <string> strset;
  set <string>::iterator si;
  strset.insert("cantaloupes");
  strset.insert("apple");
  strset.insert("orange");
  strset.insert("banana");
  strset.insert("grapes");
  strset.insert("grapes"); 
   // This one overwrites the previous occurrence
  for (si=strset.begin(); si!=strset.end(); si++) 
  {  cout << *si << " ";  }
  cout << endl;
  return 0;
}
// Output: apple banana cantaloupes grapes orange
If you want to become an STL fanatic, you can also replace the output loop in the program with the following lines.
 Collapse
copy(strset.begin(), strset.end(), ostream_iterator<string>(cout, " "));
While instructive, I find this personally less clear and prone to error. If you see it, now you know what it does.
All the STL Containers
Containers pre-date templates and are computer science concepts that have been incorporated into STL. The following are the seven containers implemented in STL.
vector - Your standard safe array. It is expanded in the "front" direction only.
deque - Functionally the same as a vector. Internally, it is different. It can be expanded in both the front and back.
list - Can only be traversed one step at time. If you are already familiar with the concept of a list, an STL list is doubly linked (contains pointer to both the previous and next value).
set - contains unique values that are sorted.
map - sorted set of paired values, one of which is the key on which sorts and searches occur, and the value which is retrieved from the container. E.g. instead of ar[43] = "overripe", a map lets you do this ar["banana"] = "overripe". So if you wanted to draw up a bit of information keyed on full name is easily done.
multiset - same as a set, but does not necessarily have unique values.
multimap - same as a map, but does not necessarily have unique keys.
Note: If you are reading the MFC help then you will also come across the efficiency statement of each container. I.E. (log n * n) insertion time. Unless you are dealing with very large number of values, you should ignore this. If you start to get a noticeable lag or are dealing with time critical stuff then you should learn more about the proper efficiency of various containers.
How to Use a Map with some Class
The map is a template that uses a key to obtain a value.
Another issue is that you will want to use your own classes instead of data types, like int that has been used up to now. To create a class that is "template-ready", you must be ensure that the class contains certain member functions and operators. The basics are:
default constructor (empty, usually)
copy constructor
overload "="
You would overload more operators as required in a specific template, for example, if you plan to have a class that is a key in a map you would have to overload relational operators. But that is another story.
 Collapse
// Program: Map Own Class
// Purpose: To demonstrate a map of classes

#include <string>
#include <iostream>
#include <vector>
#include <map>
using namespace std;
class CStudent
{
public :
  int nStudentID;
  int nAge;
public :
  // Default Constructor - Empty
  CStudent()  {  }
  // Full constructor
  CStudent(int nSID, int nA)  {  nStudentID=nSID; nAge=nA;  }
  // Copy constructor
  CStudent(const CStudent& ob) 
    {  nStudentID=ob.nStudentID; nAge=ob.nAge;  }
  // Overload =
  void operator = (const CStudent& ob) 
    {  nStudentID=ob.nStudentID; nAge=ob.nAge;  }
};
int main(int argc, char* argv[])
{
  map <string, CStudent> mapStudent;
  mapStudent["Joe Lennon"] = CStudent(103547, 22);
  mapStudent["Phil McCartney"] = CStudent(100723, 22);
  mapStudent["Raoul Starr"] = CStudent(107350, 24);
  mapStudent["Gordon Hamilton"] = CStudent(102330, 22);
  // Access via the name
  cout << "The Student number for Joe Lennon is " <<
    (mapStudent["Joe Lennon"].nStudentID) << endl;
  return 0;
}
TYPEDEF
If you like to use typedef, this an example:
 Collapse
typedef set <int> SET_INT;
typedef SET_INT::iterator SET_INT_ITER
One convention is to make them upper case with underscores.
ANSI / ISO string
ANSI/ISO strings are commonly used within STL containers. It is your standard string class, widely praised except for its deficiency of no format statement. You must instead use << and the iostream codes (dec, width, etc.) to string together your string.
Use c_str() to retrieve a character pointer, when necessary.
Iterators
I said that iterators are pointers, but there is more. They look like pointers, act like pointers, but they are actually embedded in which the indirection operator (unary *) and -> have been overloaded to return a value from the container. It is a bad idea to store them for any length of time, as they usually invalid after a value has been added or removed from a container. They are something like handles in this regard. The plain iterator can be altered, so that the container is to be traversed in different ways:
iterator - For any container other than the vector, you can only step one at a time in a forward direction through the container. That is you can only use the ++ operator, not the -- or += operator on it. For vector only you can use any of +=, --, -=, ++, and all the comparison operators <, <=, >, >=, ==, !=.
reverse_iterator - If you want to step backwards instead of forwards through a non-vector container, replace iterator with reverse_iterator, begin() with rbegin(), and end() with rend(), ++ will then traverse backwards.
const_iterator - a forward iterator that returns a const value. Use this if you want to make it clear that this points to a read-only value.
const_reverse_iterator - a reverse iterator that returns a const value.
Sorting Order in Sets and Maps
Templates have other parameters besides the type of value. You can also pass callback functions (known as predicates - this is a function of one argument that returns a bool value). For example, say you want a set of strings that are automatically sorting in ascending order. You would simply create a set class in this way:
 Collapse
set <int, greater<int> > set1
greater <int> is another template for a function (generic function) which is used to sort values, as they are placed into the container. If you wanted the set to be sorted in descending order, you would write:
 Collapse
set <int, less<int> > set1
There are many other cased you must pass a predicate as parameter to the STL class, in algorithms, described below.
STL Annoyance #2 - Long Error Messages
The templated names get expanded for the compiler, so when the compiler chokes on something, it spits out extremely long error messages that are difficult to read. I have found no good way around this. The best is to develop the ability to find and focus on the end of the error code where the explanation is located. Another related annoyance: if you double click on the template error, it will take you to the point in the code within the template code, which is also difficult to read. Sometimes, it is best just to carefully re-examine your code, and ignore the error messages completely.
Algorithms
Algorithms are functions that apply to templates. This is where the real power of STL starts to show up. You can learn a few function names that usually apply to most of the template containers. You can sort, search, manipulate, and swap with the greatest of ease. They always contain a range within which the algorithm performs. E.g.: sort(vec.begin()+1, vec.end()-1) sorts everything but the first and last values.
The container itself is not passed to the algorithm, just two iterators from the container that bookend a range. In this way, algorithms are not restricted by containers directly, but by the iterators supported by that specific algorithm. In addition, many times you will also pass a name of a specially prepared function (those afore mentioned predicates) as an argument. You can even pass plain old values.
Example of algorithms in play:
 Collapse
// Program: Test Score
// Purpose: To demonstrate the use of algorithm
// with respect to a vector of test scores

#include <algorithm>  // If you want to use an
   // algorithm this is the header used.
#include <numeric>  // (For Accumulate)
#include <vector>
#include <iostream>
using namespace std;
int testscore[] = {67, 56, 24, 78, 99, 87, 56};
// predicate that evaluates a passed test
bool passed_test(int n)
{
  return (n >= 60);
}
// predicate that evaluates a failed test
bool failed_test(int n)
{
  return (n < 60);
}
int main(int argc, char* argv[])
{
  int total;
  // Initialize a vector with the data in the testscore array
  vector <int> vecTestScore(testscore,
     testscore + sizeof(testscore) / sizeof(int));
  vector <int>::iterator vi;
  // Sort and display the vector
  sort(vecTestScore.begin(), vecTestScore.end());
  cout << "Sorted Test Scores:" << endl;
  for (vi=vecTestScore.begin(); vi != vecTestScore.end(); vi++)
  {  cout << *vi << ", ";  }
  cout << endl;
  // Display statistics

  // min_element returns an _iterator_ to the
  // element that is the minimum value in the range
  // Therefor * operator must be used to extract the value
  vi = min_element(vecTestScore.begin(), vecTestScore.end());
  cout << "The lowest score was " << *vi << "." << endl;
  // Same with max_element
  vi = max_element(vecTestScore.begin(), vecTestScore.end());
  cout << "The highest score was " << *vi << "." << endl;
  // Use a predicate function to determine the number who passed
  cout << count_if(vecTestScore.begin(), vecTestScore.end(), passed_test) <<
    " out of " << vecTestScore.size() <<
    " students passed the test" << endl;
  // and who failed
  cout << count_if(vecTestScore.begin(),
    vecTestScore.end(), failed_test) <<
    " out of " << vecTestScore.size() <<
    " students failed the test" << endl;
  // Sum the scores
  total = accumulate(vecTestScore.begin(),
     vecTestScore.end(), 0);
  // Then display the Average
  cout << "Average score was " <<
    (total / (int)(vecTestScore.size())) << endl;
  return 0;
}
See you later, Allocator
These are used in the initialization stages of a template. They are mysterious behind the scenes type of creatures, and really only of concern if you are doing high level memory optimization, and are best considered to be black boxes. Usually, you never even specify them as they are default parameters that are generally not tinkered with. It is best to know what they are though in case they show up on one of those employment tests.
Derive or Embed Templates
Any way that you use a regular class, you can use an STL class.
It can be embedded:
 Collapse
class CParam
{
  string name;
  string unit;
  vector <double> vecData;
};
or used as a base class:
 Collapse
class CParam : public vector <double>
{
  string name;
  string unit;
};
Derivation should be used with some caution. It is up to you as to the form that fits your programming style.
Templates within Templates
To create a more complex data structure, you can nest a template within a template. It is best to typedef beforehand on the internal template as you will certainly need to use the inner template again.
 Collapse
// Program: Vector of Vectors Demo
// Purpose: To demonstrate nested STL containers

#include <iostream>
#include <vector>

using namespace std;
typedef vector <int> VEC_INT;
int inp[2][2] = {{1, 1}, {2, 0}}; 
  // Regular 2x2 array to place into the template
int main(int argc, char* argv[])
{
  int i, j;
  vector <VEC_INT> vecvec;
  // if you want to do this in all one step it looks like this
  // vector <vector <int> > vecvec;
 
  // Fill it in with the array
  VEC_INT v0(inp[0], inp[0]+2);  // passing two pointers
    // for the range of values to be copied to the vector
  VEC_INT v1(inp[1], inp[1]+2);
  vecvec.push_back(v0);
  vecvec.push_back(v1);
  for (i=0; i<2; i++)
  {
    for (j=0; j<2; j++)
    {
      cout << vecvec[i][j] << "  ";
    }
    cout << endl;
  }
  return 0;
}
// Output:
// 1 1
// 2 0
Although cumbersome to initialize, once completed and filled in, you have a 2 dimensional array that is indefinitely expandable (until memory space runs out). The same can be done for any combination of containers, as the situation requires.
Conclusion
STL is useful, but not without its annoyances. As the Chinese say: if you learn it, you will be like a tiger with the claws of a lion.
Related Links
Josuttis Website
Pretty Good Initialization Library
History
Submitted on March 23, 2004
Edited on April 2, 2004
License
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
About the AuthorJeff Bogan
 
Member  I shuffle tiny static charges on intricate wafers of silicon all day. Occupation:  Web Developer
Location:   Canada

Other popular STL articles:
An In-Depth Study of the STL Deque Container
This article presents an in-depth analysis of std::deque and offers guidance as to when to prefer using it as opposed to std::vector, by taking into consideration memory allocation and container performance.
Smart Pointers to boost your code
A beginner's introduction to the smart pointers provided by the boost library.
An STL-like bidirectional map
A template container implementing a bidirectional map that blends well with STL.
Upgrading an STL-based application to use Unicode.
Problems that developers will face when upgrading an STL-based application to use Unicode and how to solve them.
Can search_n be more efficient?
This article is discussing the efficiency of the most popular search_n implementations. Furthermore, it is introducing a new search_n specialization for random access iterators, which outruns by far the most commonly used implementations.
 
C++二维vector实战指南:内存布局、边界安全与性能优化 二维vector是C++中用于表示矩阵、图像、动态网格等二维数据结构的基础容器,其本质并非简单嵌套,而是由顶层容器管理多个独立连续内存块构成。理解其三层结构(外层vector + 中间vector对象 + 底层数据块)有助于规避缓存失效、越界访问和内存泄漏等常见问题。结合at()运行时检查与operator[]的零开销特性,可在开发阶段提升调试确定性,在生产环境保障性能可控。广泛应用于算法竞赛(如采药DP)、OpenCV图像处理、小游戏开发及嵌入式AI推理结果解析等场景。本文聚焦C++二维vector的核心 阅读详情

相关推荐

【信息科学与工程学】【数据科学】数据科学领域——第三篇 数学08 几何学00总篇

编号英文名称中文名称简要说明/归属1Foundations of Geometry几何基础公理化方法, Hilbert《几何基础》2Euclidean Geometry (Synthetic)欧几里得几何(综合法)《几何原本》传统3Analytic Geometry解析几何坐标方法, Descartes, Fermat4Plane Geometry平面几何三角形、圆、共点共线等经典问题5Solid Geometry立体几何三维空间中的图形与度量6Non-Euclidean Geometry非欧几何平行公设不

weixin_49199313的博客 236

STL实践指南 Practical Guide to STL

文章标题:STL实践指南Practical Guide to STL(上)原 作 者:Jeff Bogan  译者注 这是一篇指导您如何在Microsoft Visual Studio下学习STL并进行实践的文章。这篇文章从STL的基础知识讲起,循序渐进,逐步深入,涉及到了STL编写代码的方法、STL代码的编译和调试、命名空间(namespace)、STL中的ANSI / ISO字符串、各种不

回家念经(kv300)--编程之禅 2219

国内知名技术转移机构在推动区域产业升级方面有哪些代表性案例?.docx

国内知名技术转移机构在推动区域产业升级方面有哪些代表性案例?

STL实践指南 Practical Guide to STL

STL实践指南 Practical Guide to STLQuote STL实践指南 Practical Guide to STLSTL简介STL (标准模版库,Standard Template Library)是当今每个从事C++编程的人需要掌握的一项不错的技术。我觉得每一个初学STL的人应该花费一段时间来熟悉它,比如,学习STL时会有急剧升降的学习曲线,并且有一些命名是

学海无涯 819

中国裁判文书网案例批量爬取

本文介绍了某法院网站数据采集的技术研究过程,主要包含JS逆向分析和数据解密方法。通过开发者工具分析发现页面数据经过加密处理,重点研究了ciphertext等加密参数的生成逻辑。文章详细记录了定位加密函数、扣取加密代码、解密数据处理的全流程,并验证了解密方法的有效性。研究过程中强调了技术使用的法律边界,明确声明仅用于合法技术研究,禁止任何非法数据爬取行为。最终实现了加密数据的成功解密,并解释了各请求参数的作用,为后续数据清洗和存储奠定了基础。

2303_80825459的博客 830

Matlab子图排版终极指南:从tight_subplot到tiledlayout的实战对比

本文深入对比Matlab中两大子图排版工具:社区经典函数tight_subplot与官方现代布局管理器tiledlayout。针对默认subplot产生的子图间距与边缘距离问题,详细解析两者的设计哲学、参数控制与实战应用,帮助用户根据版本与需求选择最佳方案,实现高效、精确且美观的多子图排版。

weixin_29048309的博客 363

A Practical Guide To STL

http://www.codeproject.com/vcpp/stl/PracticalGuideStl.asp Introduction STL (Standard Template Library) is a good skill for anyone programming C++ in the modern day. I must say that it takes some get...

weixin_30698297的博客 178

车载测试实战:adb logcat日志高效抓取与问题定位技巧

本文详细介绍了车载测试中adb logcat日志的高效抓取与问题定位技巧。作为车载测试的“第一现场”,adb logcat能实时、精准地抓取系统与应用日志,是定位应用崩溃、ANR及功能异常等问题的关键工具。文章从环境搭建、核心命令组合拳到实战分析与自动化脚本,提供了完整的操作指南,帮助测试人员快速掌握这一必备技能,大幅提升问题排查效率。

ii567的博客 1049

STL实践指南 Practical Guide to STL[转]

STL实践指南 Practical Guide to STLQuote STL实践指南 Practical Guide to STLSTL简介STL (标准模版库,Standard Template Library)是当今每个从事C++编程的人需要掌握的一项不错的技术。我觉得每一个初学STL的人应该花费一段时间来熟悉它,比如,学习STL时会有急剧升降的学习曲线,并且有一些命名是

四毛的专栏 763

磁编码器选型避坑指南:为什么MT6816比霍尔传感器更适合你的伺服系统?

本文深入对比了MT6816磁编码器与传统霍尔传感器在伺服系统中的应用。MT6816基于AMR技术,对磁场方向敏感而非强度,具备高精度、强抗干扰、高安装容差和极低延时等优势,尤其适合高转速、恶劣环境下的工业场景,能有效提升系统可靠性与长期稳定性。

rainy的博客 1106

【Anaconda】解决“libGL error: MESA-LOADER: failed to open iris”问题

stackoverflow中的“libGL error: MESA-LOADER: failed to open iris”问题。而在自己创建的conda环境中的lib下出现`GLIBCXX_3.4.30’ not found 的情况。在上述解决方案中,将第一行命令的lib路径换成自己创建的conda环境lib路径,运行指令,问题解决。目前问题解决,总结一下查找资料以及解决方法。运行如下命令,发现本地支持。

quintus0505的博客 5027

Practical Guide to STL By Jeff Bogan

Introduction STL (Standard Template Library) is a good skill for anyone programming C++ in the modern day. I must say that it takes some getting used to, i.e. there is a fairly steep learning curve,

Tech is Online(物联网技术传播) 1205

【数据挖掘】遗传算法原理浅析:什么是遗传算法?遗传算法的工作原理是什么?

遗传算法(Genetic Algorithm,GA),是进化算法的框架和核心。 各种进化算法有什么异同? - 及时物语的回答 - 知乎 https://www.zhihu.com/question/39152390/answer/901070749

纸羊同学的博客 4296

A practical guide to C++ serialization

A practical guide to C++ serialization In a nutshell, serialization consists of writing data and objects on a support (a file, a buffer, a socket), so that they can be reconstructed later in the

青青的专栏--C/C++ OOA/D Design Pattern 1080

深度学习实战:基于YOLOv5/v8/v10的快递暴力分拣检测系统(完整版)

在电商物流高速发展的今天,快递包裹日均处理量已突破亿件级别。然而,快递分拣过程中的暴力抛扔行为不仅造成包裹损坏,更带来巨大的经济损失。据统计,每年因暴力分拣导致的快递破损投诉占总投诉量的30%以上。传统的人工监控方式存在疲劳、疏漏等问题,因此开发一套智能化的快递暴力分拣检测系统具有重要的现实意义。

YOLO 284

01-诊断开发流程概述

传送门 ==>> AutoSAR入门和实战系列总目录。

1787

C++ 串行化——A practical guide to C++ serialization

Boost 有很多种 archive 格式,例如 Text, XML, and Binary archives,但是基本上只用 Text 和 XML,因为 Binary 的不保证 32bit/64bit 大端/小端等平台兼容性。 这里只介绍 Non Intrusive Version,也就是不需要修改原来的类定义:。 一个简答例子: #include &amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;boost/archive/te...

all for one,one for all 1535

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

C++程序设计之四书五经(下篇)

C++程序设计之四书五经(下篇)  我在上篇中“盘点”了TCPL和D&E以及入门教程、高效和健壮编程、模板和泛型编程等方面共十几本C++好书。冬去春来,让我们继续C++书籍精彩之旅 标准库  当我还在研究院工作时,与同院另外两家研究所合作开发过一个大型水利枢纽调度集成项目。我们三家软件系统之间都要相互通信。在调试通讯模块时,细心的客户(一名好学的系统管理员)发现对于同一通信规约的

cutter_point的专栏 691

全球国家地区城市数据

MySQL全球国家地区城市数据报。。。。。。。。。。。。

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

[转载]一个图形爱好者的书架/白话说学计算机图形学

[转载]一个图形爱好者的书架/白话说学计算机图形学 1.一个图形爱好者的书架 原文地址:http://blog.csdn.net/nhsoft/archive/2004/06/23/22992.aspx          早几天看到有人把自己在大学四年的书列了出来.招来一顿怀疑.我是开发图形程序的.我现在也把我的书列出来.不怕大家怀疑吧.希望能有点启示作用. 绿色的是我看完了的。

在逆境中成长 1345

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

上一篇: 软件十年有感 --- 金蝶中间件公司CTO袁红岗
下一篇: 详解堆与栈
boby2010
博客等级 码龄17年 0粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值