You are not logged in.

#1 2003-01-06 17:02:33

dunbar
Member
From: Central New Hampshire USA
Registered: 2002-08-14
Posts: 106

C/C++ question.

I am not asking for code help as I am  not a programmer at all.

When someone writes code under C/C++, they need to declare a few things.

File names will have to be one of these things under certain circumstances, am I correct?
File names such as configuration file names?

If so, I could possibly grep for a file declaration command within a file provided with the sourcecode and from the grep output I could determine what the filenames are called by the source code. That would be helpful as I try to polish my weak Linux administration skills.

Offline

#2 2003-01-07 12:30:44

dunbar
Member
From: Central New Hampshire USA
Registered: 2002-08-14
Posts: 106

Re: C/C++ question.

In GWBasic, I used to write something like

open for input as 1 'filename.ext',0

Is nothing similar in the source code for Linux?

Offline

#3 2003-01-07 13:43:45

ody
Member
From: Manchester, UK
Registered: 2002-08-12
Posts: 216
Website

Re: C/C++ question.

in C its normally..
*fp= fopen("file", "r");
or
fopen(fp,"file","r");

I think thats it, so yeah u can grep out file names.

Offline

#4 2003-01-07 13:49:22

dunbar
Member
From: Central New Hampshire USA
Registered: 2002-08-14
Posts: 106

Re: C/C++ question.

Thank you, Ody.

What do you think - am I whacked for going about this in this fashion?

Offline

Board footer

Powered by FluxBB