Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse string parameter fails. #10

Open
diegomazala opened this issue Aug 10, 2020 · 1 comment
Open

Parse string parameter fails. #10

diegomazala opened this issue Aug 10, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@diegomazala
Copy link

diegomazala commented Aug 10, 2020

If you use
Parse(root, "data1.txt");
as it is in the FirstExample.cpp, it works

However, if you use
const std::string file = "data1.txt";
Parse(root, filepath);
it throws an exception

If we use
const std::string file = "data1.txt";
Parse(root, filepath.c_str());
it works

I am using Microsoft Visual Studio Community 2019 Version 16.6.0

@jimmiebergmann
Copy link
Owner

Yeah, the API is flawed and uses overloads incorrectly.
Parsing a file should be renamed to "ParseFile" or something.

@jimmiebergmann jimmiebergmann added the enhancement New feature or request label Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants