I am a C# programmer who is learning OpenCV in C++ with Visual Studio 2017. In C# we can invoke CTRL+.
to automatically activate using
directive as long as the corresponding assembly are already referenced in the project.
In a book I am reading, the author always shows the code snippet without saying what headers I have to include. For example, he wrote
void salt(Mat& image, int n)
{
std::default_random_engine generator;
// others are removed for the sake of brevity.
}
When I found the prefix std
, I always thought that the function must be in iostream
. After searching, std::default_random_engine
is apparently in random
header file.
Question
How do we know in which header does a function exist (with VS 2017)? How can I know that namespace std
also includes random
in addition to iostream
.