prebrati vrstico v c?

int main(int argc, char** argv)
{
char* vpis;
vpis=readline("vpisi besedo: ");//preberemo besedo
printf("Beseda je: %s\n",vpis);
return 0;
}
če prevedem z gcc -lreadline mi napiše to:
toni@cmb51-104:~/OSPO/vaje1/03$ gcc 03.c
03.c:3:31: error: readline/readline.h: No such file or directory
03.c: In function ‚Ä?main‚Äô:
03.c:17: warning: assignment makes pointer from integer without a cast
toni@cmb51-104:~/OSPO/vaje1/03$ gcc 03.c -lreadline
03.c:3:31: error: readline/readline.h: No such file or directory
03.c: In function ‚Ä?main‚Äô:
03.c:17: warning: assignment makes pointer from integer without a cast

Povejte prosim kako bi to rešil da bi delovalo?
lp toni

Komentarji

  • sudo apt-get install gcc g++
  • christooss Član Ubuntu.si
    #include

    void main()
    {
    printf("\nHello World\n");
    }

    Mam tole kodo. pa mi ne dela LOL

    evo eror

    $ gcc hello.c
    hello.c: In function ‚Ä?main‚Äô:
    hello.c:4: warning: return type of ‚Ä?main‚Äô is not ‚Ä?int‚Äô
  • pa ti se mal hecaš ne ? Tam napiš int pred main pa bo delalo :)

    #include

    int main()
    {
    printf("\nHello World\n");
    }

    ./a.out

    na konc :))
Za komentiranje se prijavite ali pa se vpišite.