-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Help for a Beginner? #2141
Copy link
Copy link
Closed
Labels
kind: questionsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Description
Activity
Metadata
Metadata
Assignees
Labels
kind: questionsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Hello,
I am trying to make a text based game and had the idea to use a json file to store all of the text for each page. And then I can conveniently turn the text into a json object and in my main.cpp output the text from the json file.
Because I am new (barely figured out how to get this library installed) I am having a hell of a time understanding the documentation. Is my stated objective possible?
The only thing I have figured out how to do is store text in a json file:
{
"text": "goes here"
}
and then in my main.cpp file I call that text by opening and reading into the file:
However, this does not behave as I'd expect. It outputs everything including the quotations and the {} which is what I don't want. I would need just a string outputted.
Basically I am very confused.... Any help would be greatly appreciated.