Identify the compiler errors and state what is wrong with the code.
```
#include
using namespace std;
Class Birds
{
private:
string name;
float size;
public:
Birds();
void SingASong();
}
void SingASong()
{
cout << name << “ says cheep cheep”;
}
int main()
{
Birds Sparrows[30];
Sparrows.SingASong[0];
}
```
```
#include
using namespace std;
Class Birds << should be class not Class
{
private:
string name;
float size;
public:
Birds();
void SingASong();
} << need a ; here
void SingASong() << need a Bird:: here
{
cout << name << “ says cheep cheep”; << won’t know name until
it is part of Bird::
}
int main()
{
Birds Sparrows[30];
Sparrows.SingASong[0]; << the [0] should be Sparrows[0].
}
```
You might also like to view...
To find the records with the value 43356 for the ZIP code, you would use the ________ comparison operator
Fill in the blank(s) with correct word
Which of the following values for q will result in kiwi being included in the output?
For the code segment below: ``` switch(q) { case 1: System.out.println("apple"); break; case 2: System.out.println("orange"); break; case 3: System.out.println("banana"); break; case 4: System.out.println("pear"); case 5: System.out.println("grapes"); default: System.out.println("kiwi"); } ``` a. 2. b. Any integer less than 1 and greater than or equal to 4. c. 1. d. 3.