Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009

    Unanswered: Confused with my first Windows Application

    Hi guys,

    I am newbie to the programming world as a whole.
    Today I was thinking of how I can create my first win application.
    I have VS Express 2005.
    I started doing it but seems to get nowhere as not sure if I am on right path at all.
    What I am thinking of doing is have an application that will split a huge text file into two parts based on criteria.
    The crieria will be a list of values , which values will be found in the huge file at the same position in every row.
    So in fact the application should be doing the split based on checks for every row if the value is the same at every row as the one in the list of values. If value is the same then row will be written to different file, if value is different then I will have that row written in second file.
    So basically If my original file is A , criteria are 1,2,3
    then in the end I should have
    File B conatining only rows that match that criteria 1,2,3
    File C that will only contain rows that aren`t matching the criteria 1,2,3
    Well to me it seems to be a big deal.
    Had a research and figured thatI have to open the file , then read every line then write the line in dfferent locations.
    I don`t get what the right syntax for all that might look like.
    So if anyone can point me tpo the right direction I will be really grateful.

    Thank you

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    This type of problem is a lot easier to solve with either one or two AWK scripts. AWK is free, commonly available, and a lot easier to write this kind of task.

    Would an AWK script help you?

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Mar 2009
    Pat thank you very much for your reply,

    I did some research online on AWK (thanks to you I know it even exists).
    I think this might work.
    Will have a look and try to figure out the syntax on my own.
    Would appreciate if you can draft a simple model.
    As this task will be done repetetively and instead of doing it manually it would be great to have something that does it for you.
    Thanks again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts