reading from a .txt file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jstech

    reading from a .txt file

    I would like to have a list in a .txt file for example:
    James Bond, Action|Bowfinge r,Comedy|etc...

    then split the data into seperate strings i.e vmoviename and vgenre and
    once that is done I would like to add that to a listcontrol.

    help is appreciated!!

    thanks!


  • lallous

    #2
    Re: reading from a .txt file

    Check the fopen(), fgets(), fclose() to read from file.
    Check the strchr(), strtok() or strstr() to do string parsing/matching.
    Check MFC's CListBox.AddStr ing()

    Also check the StringList parser class from here:


    Regards,
    Elias
    "jstech" <nospam@nospam. com> wrote in message
    news:eRJvJ1DuDH A.3468@TK2MSFTN GP11.phx.gbl...[color=blue]
    > I would like to have a list in a .txt file for example:
    > James Bond, Action|Bowfinge r,Comedy|etc...
    >
    > then split the data into seperate strings i.e vmoviename and vgenre and
    > once that is done I would like to add that to a listcontrol.
    >
    > help is appreciated!!
    >
    > thanks!
    >
    >[/color]


    Comment

    Working...