小编Jac*_*son的帖子

在 Mac OS Big Sur 上使用 pyenv 安装 python 3.6 时出现问题

在我的 MacBook Air OS Big Sur 上安装 Python 3.6.13 时,使用命令 pyenv install 3.6.13 我收到此错误:

Installing Python-3.6.13...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 11.3 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/7j/0qtpb8vs1_s34ynv0f6rrs840000gn/T/python-build.20210304114832.65954
Results logged to /var/folders/7j/0qtpb8vs1_s34ynv0f6rrs840000gn/T/python-build.20210304114832.65954.log

Last 10 log lines:
./Modules/posixmodule.c:8210:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        ret = sendfile(in, out, offset, &sbytes, &sf, flags);
              ^
./Modules/posixmodule.c:10432:5: warning: code will never be executed …
Run Code Online (Sandbox Code Playgroud)

python

25
推荐指数
3
解决办法
8225
查看次数

我收到错误:无法将变量“a”声明为抽象类型“A”

这是我的代码:

#include <iostream>

using namespace std;

class Base
{
    public:
        virtual void Sub1() = 0;
        virtual void Sub2();
        virtual void Sub3();
        void Sub4();
};

class A : public Base
{
    public:
        void Sub2();
        void Sub4();
};

class B : public A
{
    public:
        virtual void Sub1();
        void Sub2();
};

class C : public Base
{
    public:
        virtual void Sub1();
        virtual void Sub4();
};

void Base::Sub2()
{
    cout << "Hello from Base::Sub2()" << endl;
}

void Base::Sub3()
{
    cout << "Hello …
Run Code Online (Sandbox Code Playgroud)

c++ inheritance abstract-class

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

标签 统计

abstract-class ×1

c++ ×1

inheritance ×1

python ×1