Thread: C++ Parser

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    14

    C++ Parser

    Ok well, apparently I can't read in a list(array) of integers from a .cfg configuration file. [Removed by moderators]

    So I've tried all kinds of ........ and came across the information I need to use a parser? I'm not sure about this because why can you read other input from a file, but not integers?

    The file structure is as follows:

    "Users"
    {
    "Sect" "0"
    "Clan" "0"
    "Potence" "5"
    "Celerity" "5"
    "Strength" "5"
    "Dexterity" "5"
    "Stamina" "5"
    "Fireamrs" "5"
    "Money" "6850"
    "XP" "43"
    }

    I've tried multiple things but to no avail, someone please hook a brother up and guide me through the darkness.

  2. #2
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    > someone please hook a brother up and guide me through the darkness.

    Google has the magic ability to clear the darkness in 99% of cases.

    > "Oh well no ones going to help you because your asking for someone to do it for you." So I don't want any of that bull...

    That's not bull, it's damn good advice.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    14
    [Removed by moderators]

  4. #4
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Well there was no need for that - where's the love?
    Reported.
    Last edited by cboard_member; 09-24-2006 at 11:57 AM.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  5. #5
    Registered User
    Join Date
    Feb 2006
    Posts
    14
    [Removed by moderators]

  6. #6
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    >So I've tried all kinds of ........ and came across the information I need to use a parser?
    Can you show us anything that you've tried, or did you throw it all away when it didn't work? We're more than happy to help people correct broken code, but you haven't shown us anything.

    > I'm not sure about this because why can you read other input from a file, but not integers?
    You can read integers from a file. The extraction (>>) operator should do that, for instance.

  7. #7
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    >> We're more than happy to help people correct broken code.

    That even goes for moody old (18) men like me, who have had a really bad day and felt the need to bring it to a forum
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Working with Parser Generators - Functions
    By jason_m in forum C Programming
    Replies: 1
    Last Post: 09-09-2008, 09:38 PM
  2. doubt in c parser coding
    By akshara.sinha in forum C Programming
    Replies: 4
    Last Post: 12-23-2007, 01:49 PM
  3. Parser Help
    By Barnzey in forum C++ Programming
    Replies: 10
    Last Post: 10-26-2005, 12:10 PM
  4. Problem with a file parser.
    By Hulag in forum C++ Programming
    Replies: 7
    Last Post: 03-17-2005, 09:54 AM
  5. Parser - need help!
    By thelma in forum C Programming
    Replies: 2
    Last Post: 04-05-2004, 08:06 PM