我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

兄弟萌,这样写哪错了???

#include"test.h"
int main()
{
    test<int> a(2);
}
#pragma once
template<typename T>
class test
{
private:
    T data;
public:
    test(const T &elem);
    ~test();
};

#include "test.h"

template<typename T>
test<T>::test(const T &elem):data(elem)
{
}

template<typename T>
test<T>::~test()
{
    delete data;
}

图片说明

近期文章

  • 在Perl6中有与Go goroutines等效的东西吗?
  • Golang在结构之间切换
  • 在Go中将Unicode代码点转换为文字字符
  • 如何从Go中的字符串方法名称调用另一个包的方法
  • 递归创建具有特定所有者和组的目录
  • 在Go中使用USB
  • 在http.ResponseWriter刷新/结束时执行处理程序函数吗?
  • 是否可以在没有Swift或Objective-C的情况下使用Go创建iOS应用? [关闭]
  • 相等运算符和deepEquals in go有什么区别?
  • 在Go模板中使用地图
  • (习惯用法?)new(T)和&T {…}之间的区别?
  • 如何按地图的值对切片进行排序
  • 在Golang中释放C变量?
  • golang-指针特质
  • 大猩猩Mux会话名称
  • 可以在Go中读取.mat文件吗?
  • 误解:=在Go中的用法
  • 如何在http.go中获取当前URL?
  • 在Go中实现Ruby风格的笛卡尔积
  • 如何在不更改频道的情况下打印频道的内容

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华