草庐IT

project-template

全部标签

c++ - Visual Studio 2015 : Can't create a new empty project c++

我最近获得了新版本的VisualStudio,但我似乎找不到如何为C++创建一个空项目。选项似乎只有C#和Basic。 最佳答案 VisualStudio2015的默认(典型)安装不再包含C++编译器和工具。这是社区中一个非常受欢迎的问题,因为许多开发人员不希望C++带来足迹。如果您尝试卸载VisualStudio2015,安装程序屏幕会弹出,您会看到一个名为“修改”的按钮。这将更改您当前的安装。执行自定义安装并选择您需要的C++功能/库。据我所知,大多数版本都支持C++,包括ExpressforWindows、Expressfor

c++ - Visual Studio 2017 c++ win32 控制台项目模板

我使用的是VisualStudioCommunity2017v.15.3.1,我似乎找不到Win32控制台应用程序或Win32项目。仍然有空的c++项目模板和Windows控制台应用程序模板。在开始页面上,我仍然有可用的win32控制台项目,但如果我单击它,Igetapromptaboutremovingitfromthelist编辑:我目前安装了以下工作负载:通用Windows平台网络桌面开发使用C++进行桌面开发使用C++开发游戏VisualStudio扩展开发除了添加一些额外的组件外,我没有对工作负载配置进行任何更改。我已经摆弄了一段时间的安装程序,但无法弄清楚我需要哪个包。有什

c++ - 链接器错误 'unresolved external symbol' : working with templates

我有一个基于模板的类[Allotter.h&Allotter.cpp]:templateclassAllotter{public:Allotter();quint32getAllotment(allotType*);boolremoveAllotment(quint32,intauto_destruct=0);private:QVector>indexReg;intinit_topIndex;};它的用法如[ActiveListener.h&ActiveListener.cpp]所示:classActiveListener:publicQObject{Q_OBJECTpublic:Ac

c++ - "if the context from which the specialization is referenced depends on a template parameter"是什么意思?

根据C++17标准,[temp.point]/4,强调我的,Foraclasstemplatespecialization,aclassmembertemplatespecialization,oraspecializationforaclassmemberofaclasstemplate,ifthespecializationisimplicitlyinstantiatedbecauseitisreferencedfromwithinanothertemplatespecialization,ifthecontextfromwhichthespecializationisrefere

c++ - "templating"命名空间

我想构建这样的东西:File1:templatenamespacemyNamespace{classmyClass1{myClass1(Vectorv){...}}}File2:templatenamespacemyNamespace{classmyClass2{myClass2(Vectorv){...}}}当然这是不可能的,因为你不能模板命名空间。相反,我可以使用结构而不是命名空间,但这样我就无法将命名空间函数分布到多个文件中。这样的问题有什么解决办法吗?PS:我知道我可以对类进行模板化,但是我必须在创建新类时指定要使用的vector类型。 最佳答案

git报错The project you were looking for could not be found 解决方式

问题描述:使用git从远程仓库克隆项目到本地的时候。gitclonehttp://gitlab.com/project/xxxx.git出现这个问题:Theprojectyouwerelookingforcouldnotbefound.原因分析:你的账号没有项目的权限,你可以在浏览器输入你的项目地址,如果可以进入,则说明有权限;若不能进入,说明你没有该项目的权限。你电脑的git自动保存了其他的用户名密码信息,与当前项目的用户名密码与之前的发生冲突。解决方案:1、一次性克隆的时候远程地址带上用户名及密码即可解决gitclonehttp://username:password@gitlab.com

c++ - 轻松地将许多重要的 "static library projects"重构为 "dll projects"

我有6个静态库项目:--Math-ECS:dependsonMath-Utility:dependsonECS-Physics:dependsonUtility-Graphics:dependsonUtility-BaseGame:dependsonPhysicsandGraphics-Somegame(.exe):dependsonBaseGame(The"depends"hereistransitivee.g.BaseGamealsodependsonECS.)我通过“静态库”技术成功地使用了6个项目。今天听说动态库可以减少编译时间(暂且不讨论是否属实),所以我阅读了以下链接并成功

C++ 模板部分特化 : Why cant I match the last type in variadic-template?

我尝试编写一个IsLast类型特征来检查给定类型是否是std::tuple中的最后一个类型,但下面的代码无法编译。我知道如何绕过它,但我很好奇为什么编译器不喜欢它。我想一定有一些我不知道的关于可变参数模板特化的规则。代码位于:https://godbolt.org/g/nXdodx错误信息:error:implicitinstantiationofundefinedtemplate'IsLast,int>,int>'还有关于特化声明的警告:warning:classtemplatepartialspecializationcontainstemplateparametersthatca

c++ - 警告 : specialization of template in different namespace

通过以下代码我得到了警告:warning:specializationof‘templatestructstd::iterator_traits’indifferentnamespace[-fpermissive]templateclassstd::iterator_traits{public:typedefWorddifference_type;typedefWordvalue_type;typedefToken_ptrpointer;typedefWord&reference;typedefstd::bidirectional_iterator_tagiterator_catego

c++ - 我们什么时候需要 .template 结构

我做了如下程序#include#includetemplatestructClass{templatevoiddisplay(){std::coutvoidfunc(Classk){k.display();}intmain(){Classd;func(d);}上面的程序没有编译因为display()是一个模板成员函数,所以.template的资格之前display()必须完成。我说得对吗?但是当我制作下面的程序时#include#includetemplateclassmyClass{Tdummy;/*******/public:templatevoidfunc(myClassobj)