Skip to content

having difficulty to parse a test JSON file with this #1323

Discussion options

You must be logged in to vote

It looks like you skipped over some C++ fundamentals. This forum is not a place to learn C++. I think you need to back up a few steps and get some experience with very basic C++ program structure and then come back to this problem.

All of those cout statements need to be std::cout, and you need to #include <iostream> to see the declaration for std::cout.
The bigger problem is that all those statement need to be inside a function. Statements can't appear at file scope like that in C++ like they can in Python, so C++ thinks you're declaring a variable or function, which is why it's complaining that cout doesn't name a type. You need to put all those statements into a main function and decla…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@creativegamer03
Comment options

@BillyDonahue
Comment options

@creativegamer03
Comment options

Answer selected by creativegamer03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants