当前位置:网站首页>What is wrong about the description of function templates (how to solve link format errors)
What is wrong about the description of function templates (how to solve link format errors)
2022-07-26 10:19:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
condition 1:
Function is a general basic function , So it is not put into any class , For the global . Declaration and implementation are put into .h and .cpp in ,
Compile and compile newspaper : Link error
1: Do not use template functions , With heavy load ok
2: Using template functions , But put the definition together .h in ,ok
condition 2:
stay a.h What is defined in the file is template function , Add ordinary functions , Error compiling connection , redefinition
1: Define the new function as a template function
2: Define the new function to other .h In file
3: Another possibility is that .h in include If in .cpp You can also quote from
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/129350.html Link to the original text :https://javaforall.cn
边栏推荐
- Replay the snake game with C language (II) end
- Leetcode 504. 七进制数
- 简单化构造函数的继承方法(一)- 组合继承
- Data communication foundation STP principle
- 利用原生js实现自定义滚动条(可点击到达,拖动到达)
- 3.1 leetcode daily question 6
- Usage of the formatter attribute of El table
- Use of selectors
- Flask框架初学-04-flask蓝图及代码抽离
- Flask framework beginner-03-template
猜你喜欢

Learning about opencv (2)

AirTest

【Halcon视觉】编程逻辑

【Halcon视觉】图像滤波

On the compilation of student management system of C language course (simple version)

Learning about opencv (4)

点赞,《新程序员》电子书限时免费领啦!

Data communication foundation - layer 2 switching principle

Map key not configured and uniapp routing configuration and jump are reported by the uniapp < map >< /map > component

Okaleido ecological core equity Oka, all in fusion mining mode
随机推荐
AirTest
Under win10 64 bit, matlab fails to configure notebook
时间序列异常检测
Draw arrows with openlayer
Flask framework beginner-03-template
Basics of data communication - basic knowledge of network
【Halcon视觉】仿射变换
Distributed network communication framework: how to publish local services into RPC services
Encapsulation of tabbarcontroller
在.NET 6.0中配置WebHostBuilder
INSTALL_ FAILED_ SHARED_ USER_ Incompatible error resolution
【Halcon视觉】算子的结构
Learning about tensorflow (II)
Study notes of the second week of sophomore year
The practice of OpenCV -- bank card number recognition
Vs2019 configuring opencv
C language course design Tetris (Part 1)
Prevent XSS attacks
Vs Code configures go locale and successfully installs go related plug-ins in vscode problem: Tools failed to install
The CLOB field cannot be converted when querying Damon database