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

More #includes #9

Open
dkfellows opened this issue Feb 19, 2024 · 0 comments
Open

More #includes #9

dkfellows opened this issue Feb 19, 2024 · 0 comments

Comments

@dkfellows
Copy link

It's strongly recommended to normally #include all headers to make a file "work" in that file, instead of assuming that the context will supply them. An example of that is this file:

std::vector<vector<double>> TJsAnalytics_random(unsigned int HGBnumber, std::vector<tuple<double, double>> &ConfEntropies) {

Right now, my IDE is complaining that it doesn't know what std::vector is when it has that file open... because of a missing #include <vector> at the top of the file.

NB: This issue has been Good Practice in C++ since the 1990s at least.


There are some exceptions to this rule. Your code appears to not be using any of the exceptions.

@dkfellows dkfellows mentioned this issue Feb 19, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant