Re: [gtk-list] Need help



> From: Chowdhury Takdir Hossain <
> Hello,
> I am a beginner of gtk+ and now working on a program with gtk+. 
> I want to do the following thing in my program. Though it is not
> directly related to gtk+, I will have to solve it to run my gtk+ program fully
> functional.
> 
> For example:
> system("tgif filename");
> where filename is a "variable" which retains the name of a file.
> 
> If I do as above it says filename is not found! Becuase system thinks 
> that "filename" itself is the name of the file.

As you said, this really isn't a gtk question, but anyway, I think you
want something like this:

char command[64];
char filename[32];
sprintf(command, "tgif %s", filename);
system(command);

Dave
dreed@capital.edu



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]