Quote (John_Locke @ Aug 28 2017 08:44am)
The prefix
Code
std::
means to use the std namespace's definition the item. In the sample code blocks provided, the items prefixed by std:: are defined within the std namespace. It's probably enough for a beginner to know that "std" is a very common namespace that defines a lot of commonly used classes and functions, so you'll see it used often (along with a shortcut "using namespace std" directive). They're more complicated than that, but you can read up on them here:
http://en.cppreference.com/w/cpp/language/namespaceBool is a primitive data type in C++. That means the compiler knows what it is and how to use it without any includes, classes/structs, or namespaces. Putting
Code
std::bool
tells the compiler to look for a bool type defined in the std namespace, which it cannot find. Take off the std:: prefix and it'll use the default bool data type. More information on C++ primitives here:
http://www.geeksforgeeks.org/c-data-types/You really ought to be using google to debug these issues. Your code and errors are basic enough that if you key in the exact error message into google it'll usually show you somebody else who had the exact same issue you did.