VYRESENO:Re: OT: Cecko a pointry

Brano Zarnovican zarnovican na pobox.sk
Úterý Únor 8 16:18:51 CET 2000


> > > scanf("%d %d",&i,&j);
> > 
> > Zkuste "man scanf" :-)
> 
> 
> Je mi jasne, ze ted vypadam jako debil, ale problem vazne nebyl v tom,
> ze bych ty cisla nezadal...
> ja jsem se behem prace prepunul do jineho adresare a po spusteni zkratka
> diky $PATH se mi spoustel jinej a.out..

Toto je podobne. Clovek si narychlo napise programcek aby si nieco
overil..

~$ cat > test.c
#include <stdio.h>

main( int argc, char *argv[] ) {
        int     i;
        for ( i=0; i < argc; i++ )
                printf( "\"%s\"\n", argv[i] );
}

~$ make test
~$ test hello
~$ test co to ma znamenat
test: too many arguments
~$ test hello world
test: hello: unary operator expected
~$ which test
/usr/bin/test
~$ ./test hello
"./test"
"hello"
~$

						BranoZ


Další informace o konferenci Linux