Dear All:

here ,I have a text file. In my text file,have some paragraph and each
paragraph has a Title.

Question:
How Can I know what each paragraph's offset and is in the text file and
length is .

It is appreciated for someone answer!

Re: how to know the offset of title in text file by David

David
Mon Apr 26 04:25:20 CDT 2004

On Mon, 26 Apr 2004 09:00:54 UTC, "terrcy" <terrcy@cn-finet.com> wrote:

> Dear All:
>
> here ,I have a text file. In my text file,have some paragraph and each
> paragraph has a Title.
>
> Question:
> How Can I know what each paragraph's offset and is in the text file and
> length is .
>
> It is appreciated for someone answer!

Unless you have a specific layout for the file, you will have to read
the file and determine this information for yourself. You'll need a
simple parser to determine where a title is and where the paragraphs
are.

David

Re: how to know the offset of title in text file by terrcy

terrcy
Mon Apr 26 04:37:30 CDT 2004

To David,
yes,I have a specific layout for the file.
example,I know each title.
"David" <FlyLikeAnEagle@United.Com> wrote in message
news:rOdGr40LMPU3-pn2-hfCJFgf3DR6K@localhost...
> On Mon, 26 Apr 2004 09:00:54 UTC, "terrcy" <terrcy@cn-finet.com> wrote:
>
> > Dear All:
> >
> > here ,I have a text file. In my text file,have some paragraph and each
> > paragraph has a Title.
> >
> > Question:
> > How Can I know what each paragraph's offset and is in the text file and
> > length is .
> >
> > It is appreciated for someone answer!
>
> Unless you have a specific layout for the file, you will have to read
> the file and determine this information for yourself. You'll need a
> simple parser to determine where a title is and where the paragraphs
> are.
>
> David



Re: how to know the offset of title in text file by Andy

Andy
Mon Apr 26 04:55:25 CDT 2004

Terrcy wrote:
> yes,I have a specific layout for the file.
> example,I know each title.

In C this is typically done using a combination of fgets and sscanf.

This newsgroup is not a good place to learn the basics of a
programming language. You should get a book or google for suitable
tutorials.

Regards
Andy

Re: how to know the offset of title in text file by David

David
Mon Apr 26 18:50:32 CDT 2004

On Mon, 26 Apr 2004 09:37:30 UTC, "terrcy" <terrcy@cn-finet.com> wrote:

> To David,
> yes,I have a specific layout for the file.
> example,I know each title.

Is the line above an example of your title/paragraph format?

What help do you need reading and parsing the format you
will be receiving?

David