-
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.
-
> 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.
-
-
Well there was no need for that - where's the love?
Reported.
-
-
>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.
-
>> 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 :)