在 M1 Macbook Pro 上使用 CLion 进行调试

问题描述

代码可以完美地构建和运行,但我无法调试我的代码。我是 M1 Macbook Pro 用户,我认为问题出在那里。活动监视器中显示的 Clion 架构是 Intel。 代码退出,代码 139- 中断信号 11- SIGSEGV- 分段错误。

error message after attempting to debug the code

intel architecture of Clion

代码

// Created by Kashita Talreja on 22/12/20.
//
#include<bits/stdc++.h>
using namespace std;


bool isvalid(int n) {
    int tmp = n;
    while(tmp) {
        int x = (tmp % 10);
        if(x > 0 && n % x >  0) return false;
        tmp /= 10;
    }
    return true;
}

void solve() {
    int n;
    cin >> n;
    int ok = 0;
    while(!isvalid(n)) {
        n++;
    }
    cout << n << endl;

}
int32_t main() {
    int t;
    cin>>t;
    while(t--) {
        solve();
    }
    return 0;
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...