SIGSEGV声明 [英] SIGSEGV on declaration
本文介绍了SIGSEGV声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的,这是我的WHOLE代码。我删除了一切。
我可以在 codeblocks
中编译它,但是当使用评估器时,它会给我 sigsegv
对我来说没有意义...
太多内存分配btw。
#include< iostream>
#include< cstdio>
#include< queue>
#include< cmath>
using namespace std;
int n;
int kx,ky,px,py;
long long a,b,c;
struct par
{
int x,y;
};
long long int bsiter,bsearch;
par start,stari,novi;
long long int high [1001] [1001];
int val [1001] [1001];
int ud,rl;
int main()
{
cin>> n>> kx>> ky>> px>> py>> a>> b>> C;
cout<< 0;
return 0;
}
解决方案
您的代码:
long long int bsiter,bsearch;
在 std
中有一个函数<$ <$ c> c>使用命名空间std; 删除并写入<$
b $ b cin
和 cout
之前的
Ok, so this is my WHOLE code. I removed everything else.
I can compile it no probs in codeblocks
but when using an evaluator it gives me sigsegv
Makes no sense to me...
It's not because of too much memory allocated btw.
#include <iostream>
#include <cstdio>
#include <queue>
#include <cmath>
using namespace std;
int n;
int kx,ky,px,py;
long long a,b,c;
struct par
{
int x,y;
};
long long int bsiter,bsearch;
par start,stari,novi;
long long int high[1001][1001];
int val[1001][1001];
int ud,rl;
int main()
{
cin >> n >> kx >> ky >> px >> py >> a >> b >> c;
cout << 0;
return 0;
}
解决方案
You have a namespace conflict in your code:
long long int bsiter,bsearch;
In std
there is a function bsearch
.
Remove using namespace std;
and write std::
before cin
and cout
.
这篇关于SIGSEGV声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文