submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s388830444 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
void push(int x){
t++;
c[t]=x;
}
int pop(){
t--;
return c[t+1];
}
int pop();
int t=0,c[100];
int main(){
int a,b;
char s[100];
while(scanf("%s",s)!=EOF){
if(s[0]=='+'){
a=pop();
b=pop();
push(a+b);
}
else if(s[0]=='-'){
... | main.c: In function 'push':
main.c:5:3: error: 't' undeclared (first use in this function)
5 | t++;
| ^
main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:3: error: 'c' undeclared (first use in this function)
6 | c[t]=x;
| ^
main.c: In... |
s819215422 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 101
void initialize(void);
void push(int);
void pop(void);
int isEmpty(void);
int isFull(void);
int S[MAX]
int top;
int main(void)
{
char s[MAX];
int i,x,y,z;
initialize();
while(scanf("%c",&s[MAX])!=EOF){
if(s[0]=='+'){
y = pop();
x =... | main.c:11:11: error: expected ';' before 'int'
11 | int S[MAX]
| ^
| ;
12 | int top;
| ~~~
main.c: In function 'main':
main.c:21:27: error: void value not ignored as it ought to be
21 | y = pop();
| ^
main.c:2... |
s955947437 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 101
void initialize(void);
void push(int);
void pop(void);
int isEmpty(void);
int isFull(void);
int S[MAX];
int top;
int main(void)
{
char s[MAX];
int i,x,y,z;
initialize();
while(scanf("%c",&s[MAX])!=EOF){
if(s[0]=='+'){
y = pop();
x ... | main.c: In function 'main':
main.c:21:27: error: void value not ignored as it ought to be
21 | y = pop();
| ^
main.c:22:27: error: void value not ignored as it ought to be
22 | x = pop();
| ^
main.c:27:... |
s825805993 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top.S[1000];
void push(int x){
S[top++]=x;
}
int pop(){
top--;
return S[top+1];
}
int main(){
int a,b;
top = 0;
char s[100];
while(scanf("%s",s)!=EOF){
if (s[0]=='+'){
a=pop();
b=pop();
push(a+b);
}else if (s[0]=='-'){
b=pop();
a=pop();
push(a-b);
}else if (s... | main.c:5:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
5 | int top.S[1000];
| ^
main.c: In function 'push':
main.c:7:1: error: 'S' undeclared (first use in this function)
7 | S[top++]=x;
| ^
main.c:7:1: note: each undeclared identifier is reported only once for e... |
s327931028 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
??
int top,S[1000];
void push(int x){
S[top++]=x;
}
int pop(){
top--;
return S[top+1];
}
int main(){
int a,b;
top = 0;
char s[100];
while(scanf("%s",s)!=EOF){
if (s[0]=='+'){
a=pop();
b=pop();
push(a+b);
}else if (s[0]=='-'){
b=pop();
a=pop();
push(a-b);
}else if ... | main.c:4:1: error: expected identifier or '(' before '?' token
4 | ??
| ^
main.c: In function 'push':
main.c:7:1: error: 'S' undeclared (first use in this function)
7 | S[top++]=x;
| ^
main.c:7:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:3: erro... |
s358947781 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
void push(int*,int);
int pop(int*);
int main(){
int x,S[101],top=1;
char s[100];
while( scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
push(pop(&top)+pop(&top));
} else if ( s[0] == '-' ){
push(-1*pop(&top)+pop(&top))
} else if ( s[0... | main.c: In function 'main':
main.c:14:21: error: passing argument 1 of 'push' makes pointer from integer without a cast [-Wint-conversion]
14 | push(pop(&top)+pop(&top));
| ~~~~~~~~~^~~~~~~~~~
| |
| int
main.c:5:11: note: expected 'int *' but... |
s771931810 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
void push(int*,int);
int pop(int*);
int main(){
int x,S[101],top=1;
char s[100];
while( scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
push(&top,pop(&top)+pop(&top));
} else if ( s[0] == '-' ){
push(&top,-1*pop(&top)+pop(&top));
} el... | main.c: In function 'push':
main.c:31:1: error: 'S' undeclared (first use in this function)
31 | S[top]=x;
| ^
main.c:31:1: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'pop':
main.c:36:8: error: 'S' undeclared (first use in this function)
36 | r... |
s987823280 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
void push(int*,int);
int pop(int*);
int main(){
int x,S[101],top=1;
char s[100];
while( scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
push(S,&top,pop(&top)+pop(&top));
} else if ( s[0] == '-' ){
push(S,&top,-1*pop(&top)+pop(&top));
... | main.c: In function 'main':
main.c:14:14: error: passing argument 2 of 'push' makes integer from pointer without a cast [-Wint-conversion]
14 | push(S,&top,pop(&top)+pop(&top));
| ^~~~
| |
| int *
main.c:5:16: note: expected 'int' but argument is of type... |
s215661652 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
void push(int*,int*,int);
int pop(int*,int*);
int main(){
int x,S[101],top=1;
char s[100];
while( scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
push(S,&top,pop(&top)+pop(&top));
} else if ( s[0] == '-' ){
push(S,&top,-1*pop(&top)+pop(&t... | main.c: In function 'main':
main.c:14:19: error: too few arguments to function 'pop'
14 | push(S,&top,pop(&top)+pop(&top));
| ^~~
main.c:6:5: note: declared here
6 | int pop(int*,int*);
| ^~~
main.c:14:29: error: too few arguments to function 'pop'
14 | push(S,&to... |
s672635130 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
void push(int*,int*,int);
int pop(int*,int*);
int main(){
int x,S[101],top=1;
char s[100];
while( scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
push(S,&top,pop(S,&top)+pop(S,&top));
} else if ( s[0] == '-' ){
push(S,&top,-1*pop(S,&top)+... | main.c: In function 'main':
main.c:21:17: error: passing argument 2 of 'push' makes pointer from integer without a cast [-Wint-conversion]
21 | push(&top,x);
| ^
| |
| int
main.c:5:16: note: expected 'int *' but argument is of type 'int'
5 |... |
s985176997 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
void push(int*,int*,int);
int pop(int*,int*);
int main(){
int x,S[101],top=1,y,z;
char s[100];
while( scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
y=pop(S,&top),z=pop(S,&top);
push(S,&top,y+z);
} else if ( s[0] == '-' ){
y=pop(S,... | main.c: In function 'main':
main.c:21:23: error: expected ';' before '}' token
21 | push(S,&top,y*z)
| ^
| ;
22 | } else {
| ~
|
s193823235 | p02263 | C | #include<stdio.h>
#include<memory.h>
#include<stdlib.h>
struct Stack
{
int data[100];
int p;
};
Stack stk;
void push(int n)
{
stk.p++;
stk.data[stk.p] = n;
}
int pop()
{
int d = stk.data[stk.p];
stk.p--;
return d;
}
bool isStackFull()
{
if (stk.p == sizeof(stk.data) - 1)
{
return true;
}
return false;... | main.c:11:1: error: unknown type name 'Stack'; use 'struct' keyword to refer to the type
11 | Stack stk;
| ^~~~~
| struct
main.c: In function 'push':
main.c:15:12: error: request for member 'p' in something not a structure or union
15 | stk.p++;
| ^
main.c:16:12: error: reque... |
s586048337 | p02263 | C | #include<stdio.h>
#include<memory.h>
#include<stdlib.h>
struct Stack
{
int data[100];
int p;
}stk;
//Stack stk;
void push(int n)
{
stk.p++;
stk.data[stk.p] = n;
}
int pop()
{
int d = stk.data[stk.p];
stk.p--;
return d;
}
bool isStackFull()
{
if (stk.p == sizeof(stk.data) - 1)
{
return true;
}
return f... | main.c:26:1: error: unknown type name 'bool'
26 | bool isStackFull()
| ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
3 | #include<stdlib.h>
+++ |+#include <stdbool.h>
4 |
main.c: In function 'isStackFull':
main.c:30:24: er... |
s058771755 | p02263 | C | #include <stdio.h>
#include <ctype.h>
int main(void)
{
char InputBuff[100000297]; /* operand(1000000 * 100) + operator(99) + space(198) */
int Stack[200];
int InputPoint;
int StackPoint;
int Value;
int MinusFlag;
char ch;
scanf("Input Data:%s", InputBuff);
InputPoint = 0;
StackPoint = 0;
ch = InputBu... | main.c: In function 'main':
main.c:31:41: error: implicit declaration of function 'getValue' [-Wimplicit-function-declaration]
31 | Value = getValue(&(InputBuff[InputPoint]), &InputPoint);
| ^~~~~~~~
main.c:48:25: error: implicit declarati... |
s063950375 | p02263 | C | #include<stdio.h>
int main(void){
char c;
int a[2000];
int i=0;
while((scanf("%c ", &c))!=null){
if(isdigit(c)){
a[i]=atoi(c);
i++;
}
else{
Switch(c){
case '%':
a[i-1]=a[i]/a[i-1];
i--;
case '*':
a[i-1]=a[i]*a[i-1];
i--;... | main.c: In function 'main':
main.c:6:31: error: 'null' undeclared (first use in this function)
6 | while((scanf("%c ", &c))!=null){
| ^~~~
main.c:6:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:8: error: implicit declarati... |
s176772129 | p02263 | C | include <stdio.h>
#define MAX 10000
int initialize();
int isEmpty();
int isFull();
int push(int x);
int pop(int x);
int top=0;
int S[MAX];
int main(){
int a,b;
char str[MAX];
initialize();
while(scanf("%s",str)!=EOF){
if(str[0]='+'){
a=pop();
b=pop();
push(a+b);
}else if(str[0]='-'){
a=pop();
... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
main.c: In function 'main':
main.c:16:9: error: implicit declaration of function 'initialize' [-Wimplicit-function-declaration]
16 | initialize();
| ^~~~~~~~~~
main.c... |
s779837067 | p02263 | C | #include <stdio.h>
#define MAX 10000
int initialize();
int isEmpty();
int isFull();
int push(int x);
int pop(int x);
int top=0;
int S[MAX];
int main(){
int a,b;
char str[MAX];
initialize();
while(scanf("%s",str)!=EOF){
if(str[0]='+'){
a=pop();
b=pop();
push(a+b);
}else if(str[0]='-'){
a=pop();
... | main.c: In function 'main':
main.c:19:27: error: too few arguments to function 'pop'
19 | a=pop();
| ^~~
main.c:8:5: note: declared here
8 | int pop(int x);
| ^~~
main.c:20:27: error: too few arguments to function 'pop'
20 | ... |
s706080758 | p02263 | C | #include <stdio.h>
#define MAX 10000
int initialize();
int isEmpty();
int isFull();
int push(int x);
int pop();
int top=0;
int S[MAX];
int main(){
int a,b;
char str[MAX];
initialize();
while(scanf("%s",str)!=EOF){
if(str[0]='+'){
a=pop();
b=pop();
push(a+b);
}else if(str[0]='-'){
a=pop();
b=po... | main.c: In function 'main':
main.c:31:30: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
31 | push(atoi(str));
| ^~~~
main.c: At top level:
main.c:52:6: error: conflicting types for 'push'; have 'void(int)'
52 | void push... |
s770687750 | p02263 | C | #include <stdio.h>
#define MAX 10000
int initialize();
int isEmpty();
int isFull();
int push(int x);
int pop();
int top=0;
int S[MAX];
int main(){
int a,b;
char str[MAX];
initialize();
while(scanf("%s",str)!=EOF){
if(str[0]='+'){
a=pop();
b=pop();
push(a+b);
}else if(str[0]='-'){
a=pop();
b=po... | main.c: In function 'main':
main.c:31:30: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
31 | push(atoi(str));
| ^~~~
main.c: At top level:
main.c:52:6: error: conflicting types for 'push'; have 'void(int)'
52 | void push... |
s438236461 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
int main(void){
char c;
int a[2000];
int i=0;
while((scanf("%c ", &c))!=null){
if(isdigit(c)){
a[i]=atoi(c);
i++;
}
else{
Switch(c){
case '%':
a[i-1]=a[i]/a[i-1];
i--;
case '*':
a[i-1]=a[i]... | main.c: In function 'main':
main.c:7:31: error: 'null' undeclared (first use in this function)
7 | while((scanf("%c ", &c))!=null){
| ^~~~
main.c:7:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:8: error: implicit declarati... |
s602209584 | p02263 | C | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef float Item;
static Item *s;
static int N;
void STACKinit(int);
int STACKempty(void);
void STACKpush(Item);
Item STACKpop(void);
int main(void){
char a[300];
int i=0;
scanf("%[^\n]",a);
int n=strlen(a);
STACKinit(214748364);
while(STACKempty()!=... | /usr/bin/ld: /tmp/ccYjdI5g.o: in function `main':
main.c:(.text+0x6f): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0x7c): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0xaa): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0xb6): undefined reference to `STACKpop'
/usr/bin/ld... |
s624345356 | p02263 | C | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef int Item;
static Item *s;
static int N;
void STACKinit(int);
int STACKempty(void);
void STACKpush(Item);
Item STACKpop(void);
int main(void){
char a[300];
int i=0;
scanf("%[^\n]",a);
int n=strlen(a);
STACKinit(214748364);
while(STACKempty()!=0)... | /usr/bin/ld: /tmp/ccUiYGb8.o: in function `main':
main.c:(.text+0x70): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0x77): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0x96): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0x9e): undefined reference to `STACKpop'
/usr/bin/ld... |
s037874009 | p02263 | C | #include <stdio.h>
#include <ctype.h>
int getValue(char TopCh);
int main(void)
{
int Stack[100]; /* operand(100) */
int StackPoint;
int Value;
char ch;
StackPoint = 0;
while(scanf("%c", &ch) != EOF)
{
if(ch == '-') /* minus */
{
Value = Stack[StackPoint-2] - Stack[StackPoint-1]; /* Caluculation */... | main.c: In function 'getValue':
main.c:64:33: error: expected ';' before 'return'
64 | }while(isdigit(ch) != 0)
| ^
| ;
65 |
66 | return atoi(ToAtoi);
| ~~~~~~
|
s916067654 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
int i;
char s[100];
int x[100];
for(i=0;i<100;i++){
x[i]=0;
}
i=0;
while(scanf("%s",s)!=EOF){
if(s[0]=='+'){
x[i-2]=x[i-1]+x[i-2];
i--;
}else if(s[0]=='-'){
x[i-2]=x[i-2]-x[i-1];
i--;
}else if(s[0... | main.c: In function 'main':
main.c:31:3: error: expected declaration or statement at end of input
31 | return 0;
| ^~~~~~
|
s557209956 | p02263 | C | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef float Item;
static Item *s;
static int N;
void STACKinit(int);
int STACKempty(void);
void STACKpush(Item);
Item STACKpop(void);
int main(void){
char a[300];
int i=0;
scanf("%[^\n]",a);
int n=strlen(a);
int stackin=0;
STACKinit(214748364);
for... | main.c: In function 'main':
main.c:22:8: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
22 | ???//printf("stackin=%d\n",stackin);
main.c:22:7: error: expected expression before '?' token
22 | ???//printf("stackin=%d\n",stackin);
| ^
|
s502052449 | p02263 | C | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef float Item;
static Item *s;
static int N;
void STACKinit(int);
int STACKempty(void);
void STACKpush(Item);
Item STACKpop(void);
int main(void){
char a[300];
int i=0;
scanf("%[^\n]",a);
int n=strlen(a);
int stackin=0;
STACKinit(214748364);
for... | main.c: In function 'main':
main.c:22:8: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
22 | ???//printf("stackin=%d\n",stackin);
main.c:22:7: error: expected expression before '?' token
22 | ???//printf("stackin=%d\n",stackin);
| ^
|
s741288948 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define M 2000;
int main(void){
int i=0,j=0;
char op,c;
int stack[M],num,flag;
for(i=0;i<M;i++){
stack[i]='\0';
}
i=0;
while(1){
flag=-1;
c=getchar();
if(feof(stdin)!=0){
break;
}
if('1'<=c && c<='9'){
ungetc(c,... | main.c: In function 'main':
main.c:4:15: error: expected ']' before ';' token
4 | #define M 2000;
| ^
main.c:8:13: note: in expansion of macro 'M'
8 | int stack[M],num,flag;
| ^
main.c:9:14: error: expected expression before ';' token
9 | for(i=0;i<M;i++){
| ... |
s839798763 | p02263 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
void push(int a[],char c,int *top)
{
switch(c)
{
case '+':a[*top-1]=a[*top-1]+a[*top];*top=*top-1;break;
case '-':a[*top-1]=a[*top-1]-a[*top];*top=*top-1;break;
case '*':a[*top-1]=a[*top-1]*a[*top];*top=*top-1;break;
}
}
int main(int argc, char *argv... | main.c: In function 'main':
main.c:19:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
19 | gets(a);
| ^~~~
| fgets
main.c:39:17: error: 'else' without a previous 'if'
39 | else if(a[i]!=' ')
| ... |
s806595848 | p02263 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
void push(int a[],char c,int *top)
{
switch(c)
{
case '+':a[*top-1]=a[*top-1]+a[*top];*top=*top-1;break;
case '-':a[*top-1]=a[*top-1]-a[*top];*top=*top-1;break;
case '*':a[*top-1]=a[*top-1]*a[*top];*top=*top-1;break;
}
}
int main(int argc, char *argv... | main.c: In function 'main':
main.c:19:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
19 | gets(a);
| ^~~~
| fgets
main.c:39:17: error: 'else' without a previous 'if'
39 | else if(a[i]!=' ')
| ... |
s188955599 | p02263 | C | #include <cmath>
#include <iostream>
using namespace std;
int s[105],p=0;
char in[10];
int main()
{
while(cin>>in)
{
if(in[0]=='+')
{
int a=s[p--],b=s[p--];
s[++p]=a+b;
}
else if(in[0]=='-')
{
int a=s[p--],b=s[p--];
s[++p]=b... | main.c:1:10: fatal error: cmath: No such file or directory
1 | #include <cmath>
| ^~~~~~~
compilation terminated.
|
s255180945 | p02263 | C | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <stack>
using namespace std;
stack <int>reversh_polish;//不返回值
int main(void)
{
int a, b;
char s[100];
while (scanf("%s", s) != EOF)
{
if (s[0] == '+')
{
a = reversh_polish.top();
reversh_polish.pop();
b = reversh_polish.top();
reve... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s376989357 | p02263 | C | //#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define clr(a) memset(a, 0x00, sizeof(a))
#define Error(x) cout << #x << " = " << x << endl
#define iDEBUG freopen("in.txt", "r", stdin)
#define oDEB... | main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s892321122 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
bool is_operator(char* s){
if(s[0] == '+' || s[0] == '-' || s[0] == '*'){
return true;
}else{
return false;
}
}
int pop(int* A, int* cnt){
(*cnt)--;
return A[*cnt];
}
void push(int* A, int* cnt, int value){
A[*cnt] = value;
(*cnt)++;
... | main.c:4:1: error: unknown type name 'bool'
4 | bool is_operator(char* s){
| ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
2 | #include <stdlib.h>
+++ |+#include <stdbool.h>
3 |
main.c: In function 'is_operator':
main.c:6... |
s770636909 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int top, S[1000];
void push(int x){
S[++top] = x;
}
int pop(){
top--;
return S[top+1];
}
int main()
{
int a, b;
top = 0;
char s[100];
while(scanf_s("%s", s) != EOF){
if( s[0] == '+'){
a = pop();
b = pop();
push(a + b);
} else if( s[0] ==... | main.c: In function 'main':
main.c:21:15: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
21 | while(scanf_s("%s", s) != EOF){
| ^~~~~~~
| scanf
|
s928201153 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int top, S[1000];
void push(int x){
S[++top] = x;
}
int pop(){
top--;
return S[top+1];
}
int main()
{
int a, b;
top = 0;
char s[100];
while(scanf("%s", s) != EOF){
if( s[0] == '+'){
a = pop();
b = pop();
push(a + b);
} else if( s[0] == '... | main.c: In function 'main':
main.c:37:9: error: expected declaration or statement at end of input
37 | }
| ^
|
s568070776 | p02263 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s629368791 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#define STACK_SIZE 1000
#define MAX_LENGTH 1000
int stack[STACK_SIZE];
int stack_size = 0;
int pop() {
if (stack_size <= 0) {
return stack[--stack_size];
}
}
int push(int x) {
stack[stack_size++] = x;
}
int check_number(char *s) {
// 符号あり
if (*s == '+' || *s == ... | main.c: In function 'calc':
main.c:76:11: error: 'a' undeclared (first use in this function)
76 | a = pop();
| ^
main.c:76:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:77:11: error: 'b' undeclared (first use in this function)
77 | ... |
s907165935 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int i = 1, x, y;
char a[1000];
while (scanf("%s", a) != EOF) {
i++;
if (a[i] == '+') {
y = pop();
push(pop() + y);
} else if (a[i] == '-') {
x = pop();
push(pop() - x);
} else if (a[i] =='*') {
y = pop();
push(pop() * y);
} else {
push(a[i]);
... | main.c: In function 'main':
main.c:10:5: error: implicit declaration of function 'pop'; did you mean 'popen'? [-Wimplicit-function-declaration]
10 | y = pop();
| ^~~
| popen
main.c:11:1: error: implicit declaration of function 'push' [-Wimplicit-function-declaration]
11 | push(pop() + y);
... |
s631432438 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(void){
char str[1000];
int a,b,ans,num[1000],kotae;
gets(str);
int str_size=strlen(str);
for(int i=0;i<str_size;i++){
if(str[i]=='-')
{
a=pop();
b=pop();
ans=b-a;
push(ans);
}
else if(str[i]=='+')
{
a=pop();
b=pop();
ans=b+a;
push(ans);
}
else if(str[i]==... | main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
7 | gets(str);
| ^~~~
| fgets
main.c:12:3: error: implicit declaration of function 'pop'; did you mean 'popen'? [-Wimplicit-function-declaration]
12 | a=pop(... |
s272469482 | p02263 | C | #include <stdio.h>
int top;
int S[1000];
// stack!!
void init(){
top = 0
}
void push(int x){
top++;
S[top]=x;
}
int pop(){
top--;
return S[top+1];
}
int main(){
char s[100];
int a,b;
while(scanf("%s",s)!=EOF){
if(s[0]=='+'){
a=pop();
b=pop();
push(a+b);
}
else if(s[0]=='... | main.c: In function 'init':
main.c:8:11: error: expected ';' before '}' token
8 | top = 0
| ^
| ;
9 | }
| ~
main.c: In function 'main':
main.c:39:11: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
39 | push(atoi(s));
... |
s260926204 | p02263 | C | // スタック
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<limits.h>
// スタック関連の定義
const int Max_Stack = 1000;
int stack_count = 0;
int ary_stack[Max_Stack];
void create_stack(void);
int push(int element);
int pop(void);
int main(void)
{
char character;
int ch, operand_1, operan... | main.c:11:5: error: variably modified 'ary_stack' at file scope
11 | int ary_stack[Max_Stack];
| ^~~~~~~~~
|
s331442837 | p02263 | C | // スタック
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<limits.h>
// スタック関連の定義
const int Max_Stack = 1000;
int stack_count = 0;
int ary_stack[Max_Stack];
void create_stack(void);
int push(int element);
int pop(void);
int main(void)
{
char character;
int ch, operand_1, operan... | main.c:11:5: error: variably modified 'ary_stack' at file scope
11 | int ary_stack[Max_Stack];
| ^~~~~~~~~
|
s907647382 | p02263 | C | // スタック
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<limits.h>
// スタック関連の定義
const int Max_Stack = 1000;
int stack_count = 0;
int ary_stack[Max_Stack];
void create_stack(void);
int push(int element);
int pop(void);
int main(void)
{
char character;
int ch, operand_1, operan... | main.c:11:5: error: variably modified 'ary_stack' at file scope
11 | int ary_stack[Max_Stack];
| ^~~~~~~~~
|
s622636338 | p02263 | C | // スタック
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<limits.h>
// スタック関連の定義
const int Max_Stack = 1000;
int stack_count = 0;
int ary_stack[Max_Stack];
void create_stack(void);
int push(int element);
int pop(void);
int main(void)
{
char str[10];
int i = 0, ch, operand_1, o... | main.c:11:5: error: variably modified 'ary_stack' at file scope
11 | int ary_stack[Max_Stack];
| ^~~~~~~~~
|
s398824421 | p02263 | C | // スタック
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<limits.h>
// スタック関連の定義
const int Max_Stack = 1000;
int stack_count = 0;
int ary_stack[Max_Stack];
void create_stack(void);
int push(int element);
int pop(void);
int main(void)
{
char str[10];
int i = 0, ch, operand_1, o... | main.c:11:5: error: variably modified 'ary_stack' at file scope
11 | int ary_stack[Max_Stack];
| ^~~~~~~~~
|
s838015668 | p02263 | C | // スタック
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<limits.h>
// スタック関連の定義
const int Max_Stack = 1000;
int stack_count = 0;
int ary_stack[Max_Stack];
void create_stack(void);
int push(int element);
int pop(void);
int main(void)
{
char str[10];
int i = 0, ch, operand_1, o... | main.c:11:5: error: variably modified 'ary_stack' at file scope
11 | int ary_stack[Max_Stack];
| ^~~~~~~~~
|
s878777068 | p02263 | C | // スタック
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<limits.h>
// スタック関連の定義
const int Max_Stack = 1000;
int stack_count = 0;
int ary_stack[Max_Stack];
void create_stack(void);
int push(int element);
int pop(void);
int main(void)
{
char str[10];
int i = 0, ch, operand_1, o... | main.c:11:5: error: variably modified 'ary_stack' at file scope
11 | int ary_stack[Max_Stack];
| ^~~~~~~~~
|
s067405699 | p02263 | C | // スタック
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<limits.h>
// スタック関連の定義
const int Max_Stack = 1000;
int stack_pointer = 0;
int ary_stack[Max_Stack];
void create_stack(void);
int push(int element);
int pop(void);
int main(void)
{
char str[10];
int i = 0, ch, operand_1,... | main.c:11:5: error: variably modified 'ary_stack' at file scope
11 | int ary_stack[Max_Stack];
| ^~~~~~~~~
|
s748903207 | p02263 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
class Stack
{
public:
void push(int x)
{
++myTop;
myData[myTop] = x;
}
void pop()
{
--myTop;
}
int top()
{
int nTemp = myData[myTop];
return nTemp;
}
private:
int myTop = 0;
int myData[1000] = { 0 };
};
int main()
{
char chIn[100] = { '... | main.c:5:1: error: unknown type name 'class'
5 | class Stack
| ^~~~~
main.c:6:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
6 | {
| ^
main.c: In function 'main':
main.c:31:9: error: unknown type name 'Stack'
31 | Stack staIn;
| ^~~~~
main.c:35:1... |
s763742810 | p02263 | C | だsだd
| main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
1 | だsだd
| ^~~~~~~~
|
s778213665 | p02263 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s778574146 | p02263 | C | #include<stdio.h>
#include<string.h>
#include<math.h>
int main(){
int a[101],top=0,i;
char s[101];
while(scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
top--;
a[top]=a[top]+a[top+1];
}
else if ( s[0] == '-' ){
top--;
a[top]=a[top]-a[top+1];
}
else if ( s[0] == '*' ){
... | main.c: In function 'main':
main.c:22:16: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
22 | a[top] = atoi(s);
| ^~~~
main.c:25:17: error: 'x' undeclared (first use in this function)
25 | printf("%d\n",x[1]);
| ^
main.c:25:17: n... |
s768814219 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
#define MAX 200
#define SMAX 1000000
int stack[MAX];
int top=0;
void define_code(void);//0~9,+,-,*,/に対応する文字コードを特定する。
void initialize(void);//topを0にしてスタックを初期化する
int isEmpty(void);//スタックが空なら1を返す
int isFull(void);//スタックが満杯なら1を返す
void push(int push... | main.c: In function 'stack_input':
main.c:85:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
85 | gets(str);
| ^~~~
| fgets
|
s334044944 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
#define MAX 200
#define SMAX 1000000
int stack[MAX];
int top=0;
void define_code(void);//0~9,+,-,*,/に対応する文字コードを特定する。
void initialize(void);//topを0にしてスタックを初期化する
int isEmpty(void);//スタックが空なら1を返す
int isFull(void);//スタックが満杯なら1を返す
void push(int push... | main.c: In function 'stack_input':
main.c:85:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
85 | gets(str);
| ^~~~
| fgets
|
s465686242 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
#define MAX 200
#define SMAX 1000000
int stack[MAX];
int top=0;
void define_code(void);//0~9,+,-,*,/に対応する文字コードを特定する。
void initialize(void);//topを0にしてスタックを初期化する
int isEmpty(void);//スタックが空なら1を返す
int isFull(void);//スタックが満杯なら1を返す
void push(int push... | main.c: In function 'stack_input':
main.c:85:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
85 | gets(str);
| ^~~~
| fgets
|
s566974957 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
#define MAX 500
#define SMAX 1000000
int stack[MAX];
int top=0;
void define_code(void);//0~9,+,-,*,/に対応する文字コードを特定する。
void initialize(void);//topを0にしてスタックを初期化する
int isEmpty(void);//スタックが空なら1を返す
int isFull(void);//スタックが満杯なら1を返す
void push(int push... | main.c: In function 'stack_input':
main.c:85:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
85 | gets(str);
| ^~~~
| fgets
|
s134799184 | p02263 | C | //16D8101012J 伊藤惇 dj c
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
#define MAX 200
#define SMAX 1000000
int stack[MAX];
int top=0;
void define_code(void);//0~9,+,-,*,/に対応する文字コードを特定する。
void initialize(void);//topを0にしてスタックを初期化する
int isEmpty(void);//スタックが空なら1を返す
int isFull(void);//スタックが満杯なら... | main.c:71:6: error: conflicting types for 'cal'; have 'void(int)'
71 | void cal(int str)
| ^~~
main.c:18:6: note: previous declaration of 'cal' with type 'void(char)'
18 | void cal(char str);//計算を行う
| ^~~
main.c: In function 'stack_input':
main.c:86:5: error: implicit declaration of function... |
s658428103 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
#define MAX 200
#define SMAX 1000000
int stack[MAX];
int top=0;
void define_code(void);//0~9,+,-,*,/に対応する文字コードを特定する。
void initialize(void);//topを0にしてスタックを初期化する
int isEmpty(void);//スタックが空なら1を返す
int isFull(void);//スタックが満杯なら1を返す
void push(int push... | main.c: In function 'stack_input':
main.c:85:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
85 | gets(str);
| ^~~~
| fgets
|
s618434269 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
int main(void){
char str[100];
gets(str);
int i = strlen(str);
int now; //入力の番号
int stacknum=0;
int stack[100];
// printf("入力された文字列は:%s\n%d\n", str, i);
for(now=0; now<i; now++){
//printf("入力された文字列は:%c\n",str[now]);
if(str[now]=='+'){
stack[stacknum-2]=stack[stac... | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
5 | gets(str);
| ^~~~
| fgets
main.c:6:17: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
6 | ... |
s090079877 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(void){
char str[100];
gets(str);
int i = strlen(str);
int now; //入力の番号
int stacknum=0;
int stack[100];
// printf("入力された文字列は:%s\n%d\n", str, i);
for(now=0; now<i; now++){
//printf("入力された文字列は:%c\n",str[now]);
if(str[now]=='+'){
stack[sta... | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
6 | gets(str);
| ^~~~
| fgets
|
s478602461 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(void){
char str[100];
gets(str);
int i = strlen(str);
int now; //入力の番号
int stacknum=0;
int stack[100];
// printf("入力された文字列は:%s\n%d\n", str, i);
for(now=0; now<i; now++){
//printf("入力された文字列は:%c\n",str[now]);
if(str[now]=='+'){
stack[sta... | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
6 | gets(str);
| ^~~~
| fgets
|
s460929545 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
char str[100];
gets(str);
int i = strlen(str);
int now; //入力の番号
int stacknum=0;
int stack[100];
// printf("入力された文字列は:%s\n%d\n", str, i);
for(now=0; now<i; now++){
//printf("入力された文字列は:%c\n",str[now]);
if(str[now]=='+'){
stack[stacknu... | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
6 | gets(str);
| ^~~~
| fgets
|
s410725480 | p02263 | C | #include<stdio.h>
int STACK 100;
sturuct stack{
int num;
int data[STACK];
}typedef struct stack S;
int main(void){
}
| main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
3 | int STACK 100;
| ^~~
main.c:5:1: error: unknown type name 'sturuct'; did you mean 'struct'?
5 | sturuct stack{
| ^~~~~~~
| struct
main.c:5:14: error: expected '=', ',', ';', 'asm' or '__a... |
s811018365 | p02263 | C | #include<stdio.h>
int STACK 100;
sturuct stack{
int num;
int data[STACK];
};typedef struct stack S;
int main(void){
}
| main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
3 | int STACK 100;
| ^~~
main.c:5:1: error: unknown type name 'sturuct'; did you mean 'struct'?
5 | sturuct stack{
| ^~~~~~~
| struct
main.c:5:14: error: expected '=', ',', ';', 'asm' or '__a... |
s353598133 | p02263 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s898093440 | p02263 | C | #include<stdio.h>
#define SIZE 100
int stack[SIZE];
int n=0;
void push(int x){
if(n<SIZE){
n++;
stack[n]=x;
}
}
int pop(int x){
return stack[--n];
}
int main(void){
int c,x,a,b;
while((c=getchar())!=EOF){
if(isdigit(c)){
ungetc(c,stdin);
scanf("%... | main.c: In function 'main':
main.c:19:12: error: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
19 | if(isdigit(c)){
| ^~~~~~~
main.c:2:1: note: include '<ctype.h>' or provide a declaration of 'isdigit'
1 | #include<stdio.h>
+++ |+#include <ctype.h>
2 ... |
s737777652 | p02263 | C | #include<stdio.h>
#define SIZE 100
int stack[SIZE];
int n=0;
void push(int x){
if(n<SIZE){
n++;
stack[n]=x;
}
}
int pop(){
return stack[--n];
}
int main(void){
int c,x,a,b;
while((c=getchar())!=EOF){
if(isdigit(c)){
ungetc(c,stdin);
scanf("%d",&... | main.c: In function 'main':
main.c:20:12: error: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
20 | if(isdigit(c)){
| ^~~~~~~
main.c:2:1: note: include '<ctype.h>' or provide a declaration of 'isdigit'
1 | #include<stdio.h>
+++ |+#include <ctype.h>
2 ... |
s202267926 | p02263 | C | #include<stdio.h>
#define SIZE 100
int stack[SIZE];
int n=0;
void push(int x){
if(n<SIZE){
n++;
stack[n]=x;
}
}
int pop(){
return stack[--n];
}
int main(void){
char c
int x,a,b;
while((c=getchar())!=EOF){
if(isdigit(c)){
ungetc(c,stdin);
sca... | main.c: In function 'main':
main.c:17:11: error: expected ';' before 'int'
17 | char c
| ^
| ;
18 | int x,a,b;
| ~~~
main.c:20:12: error: 'c' undeclared (first use in this function)
20 | while((c=getchar())!=EOF){
| ^
main.c:20:12: note... |
s218099104 | p02263 | C | #include<stdio.h>
#define SIZE 100
int stack[SIZE];
int n=0;
void push(int x){
stack[n]=x;
n++;
}
int pop(){
n--
return stack[n];
}
int main(void){
char c;
int x,a,b;
while((c=getchar())!=EOF){
if(isdigit(c)){
ungetc(c,stdin);
scanf("%d",&x);
... | main.c: In function 'pop':
main.c:11:8: error: expected ';' before 'return'
11 | n--
| ^
| ;
12 | return stack[n];
| ~~~~~~
main.c: In function 'main':
main.c:20:12: error: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
20 | if(i... |
s903407620 | p02263 | C | #include<stdio.h>
#define SIZE 100
int stack[SIZE];
int n=0;
void push(int x){
stack[n]=x;
n++;
}
int pop(){
n--;
return stack[n];
}
int main(void){
char c;
int x,a,b;
while((c=getchar())!=EOF){
if(isdigit(c)){
ungetc(c,stdin);
scanf("%d",&x);
... | main.c: In function 'main':
main.c:20:12: error: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
20 | if(isdigit(c)){
| ^~~~~~~
main.c:2:1: note: include '<ctype.h>' or provide a declaration of 'isdigit'
1 | #include<stdio.h>
+++ |+#include <ctype.h>
2 ... |
s096811340 | p02263 | C | #include <iostream>
#include <stack>
#include <cstdlib>
#include <cctype>
using namespace std;
int main(){
stack<int> st;
string s;
while(cin >> s){
if(isdigit(s[0])){
st.push(atoi(s.c_str()));
}
else{
int a = st.top(); st.pop();
int b = st.top(); st.pop();
if(s == "+") st.p... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s083979588 | p02263 | C | 1
| main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 1
| ^
|
s961392534 | p02263 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s271034297 | p02263 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s946947022 | p02263 | C | #include<stdio.h>
#define MAX 100;
int push(x);
int pop():
int main(){
int S[];
int top;
}
int push(int x){
}
int pop(){
}
| main.c:2:9: warning: ISO C99 requires whitespace after the macro name
2 | #define MAX 100;
| ^~~
main.c:3:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
3 | int push(x);
| ^~~
main.c: In function 'pop':
main.c:4:10: error: expected de... |
s483623224 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int top;
int S[100];
void push(int x){
S[++top] = x;
}
int pop(){
top--;
return S[top + 1];
}
int main(int argc, char** argv) {
int a,b;
top = 0;
char op[99];
while(scanf("%s", op) !=EOF){
if (op[0] == '+'){
... | main.c: In function 'main':
main.c:34:11: error: stray '#' in program
34 | }a#include<stdio.h>
| ^
main.c:34:11: error: expected ';' before 'include'
34 | }a#include<stdio.h>
| ^~~~~~~~
| ;
main.c:79:9: error: 'else' without a previous 'if'
79 | ... |
s062535634 | p02263 | C | #include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
#define MAX 100
#define max 1000000
void initialize();
int isEmpty();
int isFull();
void push(int);
int pop();
int top;
int S[max];
int main(){
char c[max];
int sum = 0;
int a,b;
initialize();
while(cin >> c){
... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s232659639 | p02263 | C | #include <stdio.h>
#define M 100
typedef struct{
int array[M];
int current;
}STACK;
void init(STACK*);
int push(STACK*,int);
int pop(STACK*,int*);
void main(){
STACK data;
int value;
//init(&data);
//push(&data,1);
//push(&s,2);
//push(&s,3);
while(pop(&s,&value))... | main.c: In function 'main':
main.c:23:16: error: 's' undeclared (first use in this function)
23 | while(pop(&s,&value)){
| ^
main.c:23:16: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'init':
main.c:33:20: error: 'MAX_LENGTH' unde... |
s121068489 | p02263 | C | #include <stdio.h>
#define M 100
typedef struct{
int array[M];
int current;
}STACK;
void init(STACK*);
int push(STACK*,int);
int pop(STACK*,int*);
void main(){
STACK data;
int value;
//init(&data);
//push(&data,1);
//push(&s,2);
//push(&s,3);
while(pop(&s,&value))... | main.c: In function 'main':
main.c:23:16: error: 's' undeclared (first use in this function)
23 | while(pop(&s,&value)){
| ^
main.c:23:16: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'init':
main.c:33:20: error: 'MAX_LENGTH' unde... |
s105323475 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define SIZE 201;
nt stack[SIZE];
int s;
int main()
{
char s[SIZE];
scanf("%[^\n]*s",s);
printf("%d\n",cal(s));
}
int pop()
{
if(s<=0) return 0;
return stack[--s];
}
int push(int a)
{
stack[s++]=a;
}
int judge(char *s){
if(*s == '+' || *s == '-... | main.c:6:1: error: unknown type name 'nt'; did you mean 'int'?
6 | nt stack[SIZE];
| ^~
| int
main.c:5:17: error: expected ']' before ';' token
5 | #define SIZE 201;
| ^
main.c:6:10: note: in expansion of macro 'SIZE'
6 | nt stack[SIZE];
| ^~~~
main.c: In fun... |
s735989715 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define SIZE 201;
int stack[SIZE];
int s;
int main()
{
char s[SIZE];
scanf("%[^\n]*s",s);
printf("%d\n",cal(s));
}
int pop()
{
if(s<=0) return 0;
return stack[--s];
}
int push(int a)
{
stack[s++]=a;
}
int judge(char *s){
if(*s == '+' || *s == '... | main.c:5:17: error: expected ']' before ';' token
5 | #define SIZE 201;
| ^
main.c:6:11: note: in expansion of macro 'SIZE'
6 | int stack[SIZE];
| ^~~~
main.c: In function 'main':
main.c:5:17: error: expected ']' before ';' token
5 | #define SIZE 201;
| ... |
s246385342 | p02263 | C | #include<stdio.h>
int main(){
int st[],i;
char c;
while(scanf("%d",&c)!=EOF){
if(c>=48 && c<=57){
st[i]=(int)c;
i++;
}
else {
if(c=='+'){
}
}
}
return 0;
}
void push(int st[],int *top,int item){
int x;
x=*top;
st[x]=it... | main.c: In function 'main':
main.c:5:7: error: array size missing in 'st'
5 | int st[],i;
| ^~
main.c: In function 'pop':
main.c:49:3: error: 'item' undeclared (first use in this function)
49 | item=st[x];
| ^~~~
main.c:49:3: note: each undeclared identifier is reported only once for each... |
s462321464 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top,S[1000];
void push(int x){
S[++top]=x;
}
int pop(){
top--;
return S[top+1];
}
int main(){
int a,b;
top=0;
char s[100];
while(scanf("%s",s)!=EOF){
if(s[0]=='+'){
a=pop();
b=pop();
push(b+a);
}else if(s[0]=='-'){
... | main.c: In function 'main':
main.c:27:1: error: invalid type argument of unary '*' (have 'int')
27 | * a=pop();
| ^~~~~~~~
|
s068027136 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top,S[1000];
void push(int x){
S[++top]=x;
}
int pop(){
top--;
return S[top+1];
}
int main(){
int a,b;
top=0;
char s[100];
while(scanf("%s",s)!=EOF){
if(s[0]=='+'){
a=pop();
b=pop();
push(b+a);
}else if(s[0]=='-'){
... | main.c: In function 'main':
main.c:27:1: error: invalid type argument of unary '*' (have 'int')
27 | * a=pop();
| ^~~~~~~~
|
s935729112 | p02263 | C | int main(){
int a,b;
top = 0;
char s[100];
while( scanf("%s", s) != EOF){
if (s[0] == '+'){
a = pop;
b = pop();
push(a+b);
}
else if(s[0] == '-'){
b = pop;
a = pop();
push(a-b);
}
else if(s[0] == '*'){
a = pop;
b = pop();
push(a*b);
}... | main.c: In function 'main':
main.c:3:3: error: 'top' undeclared (first use in this function)
3 | top = 0;
| ^~~
main.c:3:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
... |
s858781948 | p02263 | C | int main(){
int a,b;
top = 0;
char s[100];
while( scanf("%s", s) != EOF){
if (s[0] == '+'){
a = pop;
b = pop();
push(a+b);
}
else if(s[0] == '-'){
b = pop;
a = pop();
push(a-b);
}
else if(s[0] == '*'){
a = pop;
b = pop();
push(a*b);
}... | main.c: In function 'main':
main.c:3:3: error: 'top' undeclared (first use in this function)
3 | top = 0;
| ^~~
main.c:3:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
... |
s914250454 | p02263 | C | int main(){
int a,b;
top = 0;
char s[100];
while( scanf("%s", s) != EOF){
if (s[0] == '+'){
a = pop();
b = pop();
push(a+b);
}
else if(s[0] == '-'){
b = pop();
a = pop();
push(a-b);
}
else if(s[0] == '*'){
a = pop();
b = pop();
push(a*b);... | main.c: In function 'main':
main.c:3:3: error: 'top' undeclared (first use in this function)
3 | top = 0;
| ^~~
main.c:3:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
... |
s132920723 | p02263 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s221564229 | p02263 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s477940639 | p02263 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s146036080 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top, x[1000];
int main()
{
int a, b;
char c[100];
top = 0;
while(scanf("%s", s) != EOF)
{
if(s[0] == '+')
{
a = pop();
b = pop();
push(a + b);
}
else if(s[0] == '-')
{
a = pop();
b = pop();
push(a - b);
}
el... | main.c: In function 'main':
main.c:11:21: error: 's' undeclared (first use in this function)
11 | while(scanf("%s", s) != EOF)
| ^
main.c:11:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:15: error: implicit declaration of function 'po... |
s594636767 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top, x[1000];
int main()
{
int a, b;
char c[100];
top = 0;
while(scanf("%s", s) != EOF)
{
if(s[0] == '+')
{
a = pop();
b = pop();
push(a + b);
}
else if(s[0] == '-')
{
a = pop();
b = pop();
push(a - b);
}
el... | main.c: In function 'main':
main.c:11:21: error: 's' undeclared (first use in this function)
11 | while(scanf("%s", s) != EOF)
| ^
main.c:11:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:15: error: implicit declaration of function 'po... |
s226632288 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top, x[1000];
int main()
{
int a, b;
char c[100];
top = 0;
while(scanf("%s", s) != EOF)
{
if(s[0] == '+')
{
a = pop();
b = pop();
push(a + b);
}
else if(s[0] == '-')
{
a = pop();
b = pop();
push(a - b);
}
el... | main.c: In function 'main':
main.c:11:21: error: 's' undeclared (first use in this function)
11 | while(scanf("%s", s) != EOF)
| ^
main.c:11:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:15: error: implicit declaration of function 'po... |
s005255433 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top, x[1000];
int main()
{
int a, b;
char c[100];
top = 0;
while(scanf("%s", s) != EOF)
{
if(s[0] == '+')
{
a = pop();
b = pop();
push(a + b);
}
else if(s[0] == '-')
{
a = pop();
b = pop();
push(a - b);
}
el... | main.c: In function 'main':
main.c:11:21: error: 's' undeclared (first use in this function)
11 | while(scanf("%s", s) != EOF)
| ^
main.c:11:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:15: error: implicit declaration of function 'po... |
s275943754 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int get,A[1000];
void push(int x){
/*topを加算してからその位置へ挿入*/
A[++get]=x;
}
int pop(){
get--;
/*topが指していた要素を返す*/
return A[get+1];
}
int main(){
int x=0,y=0;
top=0;
char a[100];
while(scanf("%s",a)!=EOF){
if(a[0]=='+'){
x=pop();
... | main.c: In function 'main':
main.c:19:3: error: 'top' undeclared (first use in this function); did you mean 'pop'?
19 | top=0;
| ^~~
| pop
main.c:19:3: note: each undeclared identifier is reported only once for each function it appears in
|
s573431461 | p02263 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int get,A[1000];
void push(int x){
/*topを加算してからその位置へ挿入*/
A[++get]=x;
}
int pop(){
get--;
/*topが指していた要素を返す*/
return A[get+1];
}
int main(){
int x=0,y=0;
top=0;
char a[100];
while(scanf("%s",a)!=EOF){
if(a[0]=='+'){
x=pop();
... | main.c: In function 'main':
main.c:19:3: error: 'top' undeclared (first use in this function); did you mean 'pop'?
19 | top=0;
| ^~~
| pop
main.c:19:3: note: each undeclared identifier is reported only once for each function it appears in
|
s819639412 | p02263 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s454861353 | p02263 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int pop(){
top--;
return S[top+1];
}
void push(int x){
S[++top]=x;
}
int top=0;
int S[100];
int main(){
char S[100];
int top=0;
int value1,value2;
while(scanf("%s",S)!=EOF){
if(S[0]=='+'){
value1=pop();
value2=pop();
... | main.c: In function 'pop':
main.c:6:3: error: 'top' undeclared (first use in this function); did you mean 'pop'?
6 | top--;
| ^~~
| pop
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:10: error: 'S' undeclared (first use in this function)... |
s814282725 | p02263 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s850381238 | p02263 | C | #include<stdio.h>
int main(){
char stack[];
int i, j, k = 0, l = 0, flag = 0;
scanf("%s", stack);
while(stack[n] != '\0'){
n++;
}
for(i = 0; i < n; i++){//*42 +43 -45
if(flag == 0){
if(stack[i] == 43){
for(j = k; j < i; j++){//from k to i
... | main.c: In function 'main':
main.c:4:10: error: array size missing in 'stack'
4 | char stack[];
| ^~~~~
main.c:7:17: error: 'n' undeclared (first use in this function)
7 | while(stack[n] != '\0'){
| ^
main.c:7:17: note: each undeclared identifier is reported only onc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.