O
Oldbitcollector
I'm currently learning C (linux based compiler)
and like most other languarges, I'm using a project
to modivate me into learning the language.
Ive got a routine that looks like this...
FILE *fp;
int size=0;
u_int8_t *ptr=NULL;
if (!(fp=fopen(name,"rb"))) {
system("program /dev/fd0 -read"???????);
For some reason it completely escapes me how to
pass the contents of the "name" variable to the system command.
In Perl, I would have done something like this:
system("program /dev/fd0 -read $name");
Can you guys offer a little help?
Thanks
Jeff
and like most other languarges, I'm using a project
to modivate me into learning the language.
Ive got a routine that looks like this...
FILE *fp;
int size=0;
u_int8_t *ptr=NULL;
if (!(fp=fopen(name,"rb"))) {
system("program /dev/fd0 -read"???????);
For some reason it completely escapes me how to
pass the contents of the "name" variable to the system command.
In Perl, I would have done something like this:
system("program /dev/fd0 -read $name");
Can you guys offer a little help?
Thanks
Jeff