Beginner K & R

I am just starting to program and go through K & R to try to learn C. I ended up in the section on command line arguments (5.10), but now I'm at a dead end. Every time I try to open a program written using command line arguments, they tell me that the file X, X, which is the argument, does not exist.

`gcc -o find find.c

open search test

The file / Documents / Learning_C / test does not exist.

Any suggestions? Thanks

+5
source share
3 answers

What system do you work on? On Unix / Linux, you compile and run your executable with:

gcc -o find find.c
./find test

, "./", . find $PATH, find test - * nix... , (.. ./myFind testArg)

+3

.

, , "test".

,

./find toto

: ./, , "", PATH. . ( ) PATH .

P.S. , K & R. , !

+1

Instead of making us all individually guess what exactly you are doing wrong, perhaps you should insert the program you are using for this illustration?

0
source

All Articles