Erro na struct (Linguagem C)

4 respostas
C
#include <stdio.h>
#include <stdlib.h>
#define VAL_MAX 10;

typedef struct pilha 
{
   int itens[VAL_MAX];
}Pilha;

o q tá errado? =/

4 Respostas

Nicolas_Fernandes

Qual o erro que acontece ao compilar?

E

Troque

#define VAL_MAX 10;

por

#define VAL_MAX 10
C
#define VAL_MAX 10;

typedef struct pilha 
{
   int itens[VAL_MAX]; // syntax error before ';' token / no semicolon at end of struct
}Pilha; // data definition has no type or storage class
C

eita! hehe

vlw! =]

Criado 22 de setembro de 2010
Ultima resposta 22 de set. de 2010
Respostas 4
Participantes 3