小编Rob*_*t D的帖子

在Debian 8.7上安装g ++ 7.0.1

我已经尝试了一段时间在我的Debian机器上安装g ++ 7.我能够很容易地在我的Mac上安装它(因为自制软件有一个公式).但是我似乎找不到在Linux上安装它的方法.

这个人有一个关于安装g ++ 4.9 的线程,并且改变他给出的网址引导我进入这个页面,这似乎是朝着正确的方向......但我想这样安装它可能会导致一些潜在的问题当我想更新这些包时.

有没有我缺少的消息来源?或者是否有一个地方可以下载并编译我需要的所有内容以使其运行?

谢谢您的帮助.

有用的数据:
我的内核是x86_64 Linux 3.16.0-4-amd64.

编辑:按照迪特里希的建议,我现在遇到一个新的错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages …
Run Code Online (Sandbox Code Playgroud)

c++ linux debian gcc g++

6
推荐指数
2
解决办法
2万
查看次数

如何定义继承通用抽象类的通用抽象类?

我有一个类继承了一个继承另一个抽象类的抽象类.我可以将最超级的类定义为通用的,但我不知道如何在我在最终ListResults类中表达我想要的实际类型之前将中间类定义为泛型.

internal abstract class LowerCommand<T> {
    public abstract void Execute();
    public abstract List<T> ExecuteList();
}

// currently gives error for `T`
internal abstract class HigherCommand : Lowercommand<T> {
    // ... defines other stuff, nothing to do with
    //     already instantiated methods or T ...
}

class ListResults : HigherCommand<Results>
{
    public override void Execute() {...}
    public override List<Results> ExecuteList() {...}
}
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助.

c# generics abstract-class

1
推荐指数
1
解决办法
52
查看次数

标签 统计

abstract-class ×1

c# ×1

c++ ×1

debian ×1

g++ ×1

gcc ×1

generics ×1

linux ×1