All pastes #795044 Raw Edit

Unnamed

public cpp v1 · immutable
#795044 ·published 2007-11-23 17:06 UTC
rendered paste body
#include <stdio>struct node{    int szam;    node *next=null;}int maxker(node *first){    asm    {            pusha            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            popa    }}int main(){    printf("Add meg, hány számot akarsz megadni!\r\n");    int db; scanf("%d",db);    node *first, *temp;    temp=first;    for(int i=1, i<=db, i++)    {            temp=(node *)malloc(sizeof(node));            scanf("%d",temp.szam);            temp=temp.next;    }    printf("%s",maxker(first));    return 0;}main.c:1:17: error: stdio: Nincs ilyen fájl vagy könyvtármain.c:6: error: expected specifier-qualifier-list before ‘node’main.c:9: error: two or more data types in declaration specifiersmain.c:9: error: expected ‘)’ before ‘*’ tokenmain.c: In function ‘main’:main.c:41: warning: incompatible implicit declaration of built-in function ‘printf’main.c:42: warning: incompatible implicit declaration of built-in function ‘scanf’main.c:44: error: ‘node’ undeclared (first use in this function)main.c:44: error: (Each undeclared identifier is reported only oncemain.c:44: error: for each function it appears in.)main.c:44: error: ‘first’ undeclared (first use in this function)main.c:44: error: ‘temp’ undeclared (first use in this function)main.c:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<=’ tokenmain.c:51: error: ‘for’ loop initial declaration used outside C99 modemain.c:55: error: expected expression before ‘return’main.c:56: error: expected expression before ‘}’ tokenmain.c:56:2: warning: no newline at end of file