
Patrick B. answered 07/02/21
Math and computer tutor/teacher
You are very close.
#include <iostream>
#include <math.h>
#define DOG_BIG 1 //bit zero ---> 2^0=1
#define DOG_HAIRY 2 //bit one ---> 2^1 = 2
#define DOG_BROWN 4 //bit two ---> 2^2=4
#define DOG_SMART 8 // bit three --> 2^3=8
//#include "AboutDog.h"
using namespace std;
void AboutDog(const std::string & dogName, unsigned int description)
{
cout<<"This dog is called "<<dogName<<". ";
if (description != 0)
{
cout<<"It is";
if(description & DOG_BIG)
{
cout<<" big ";
}
if(description & DOG_HAIRY)
{
cout<<" hairy ";
}
if(description & DOG_BROWN)
{
cout<<" brown ";
}
if(description & DOG_SMART)
{
cout<<" smart ";
}
cout<<"."<<endl;
}
}
main()
{
AboutDog("Shotzy",DOG_BIG|DOG_SMART);
}

Patrick B.
the program will not link without it. Also, if you want to test it, you must call it from main()07/04/21
Yasmeen Y.
Do I need to put main ?07/04/21