All pastes #795064 Raw Edit

Unnamed

public c v1 · immutable
#795064 ·published 2007-11-23 17:17 UTC
rendered paste body
#include <stdio.h>struct node{    int szam;    struct node *next=NULL;};int maxker(struct node *first){    asm    {            push ebp            mov ebp,esp            mov ecx,[esp+8]            xor eax,eax            cmp ecx,0            je  vege            mov eax, [ecx]        loop_eleje:            add ecx,4            mov ecx,[ecx]            cmp ecx,0            je vege            cmp word eax,[ecx]            jge csere            jmp loop_eleje        csere:            mov eax,[ecx]        vege:            pop ebp    }}int main(){    printf("Add meg, hány számot akarsz megadni!\r\n");    int db; scanf("%d",db);    struct node *first, *temp;    temp=first;    int i;    for(i=1, i<=db, i++)    {            temp=(struct node *)malloc(sizeof(struct node));            scanf("%d",temp->szam);            temp=temp->next;    }    printf("%s",maxker(first));    return 0;}main.c:6: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘=’ tokenmain.c: In function ‘maxker’:main.c:12: error: expected ‘(’ before ‘{’ tokenmain.c:13: error: ‘push’ undeclared (first use in this function)main.c:13: error: (Each undeclared identifier is reported only oncemain.c:13: error: for each function it appears in.)main.c:13: error: expected ‘;’ before ‘ebp’main.c: In function ‘main’:main.c:45: error: expected ‘;’ before ‘)’ tokenmain.c:45: error: expected expression before ‘)’ tokenmain.c:47: warning: incompatible implicit declaration of built-in function ‘malloc’main.c:49: error: ‘struct node’ has no member named ‘next’main.c:55:2: warning: no newline at end of file