将void转换为int C ++

时间:2017-03-05 01:16:25

标签: c++ numbers sieve

使用Sieve of Tratosthenes理论编写程序,我无法将void转换为int。

继承我的代码:

primes = malloc(sizeof(int) * limit);

此行发生错误:

public void onBraintreeSubmit(View v) {

    DropInRequest dropInRequest = new DropInRequest()
            .clientToken(CLIENT_TOKEN);
    startActivityForResult(dropInRequest.getIntent(this), 0);
}

有人能指出我做错了吗?我没有使用正确的库,还是“malloc()”编码错误的函数?这个代码在C ++编译器中,但我做了研究,看到它可以在C编译程序中工作。感谢

0 个答案:

没有答案
相关问题