Identify the compiler errors and state what is wrong with the code.

```
#include
using namespace std;
class Photo
{
private:
string subject;
double amount; //of light in lumens
public:
Photo();
Void SetLight(double x){amount = x;}
}
int main()
{
Photo OneOfMe;
OneOfMe.subject = “Meg the cute girl.”;
OneOfMe.SetLight(100.0);

```

```
#include << need to include too
using namespace std;
class Photo
{
private:
string subject;
double amount; //of light in lumens
public:
Photo();
Void SetLight(double x){amount = x;} << void, not Void
}
int main()
{
Photo OneOfMe;
OneOfMe.subject = “Meg the cute girl.”;<< can’t access private
OneOfMe.SetLight(100.0); << need return 0; and close }
```

Computer Science & Information Technology

You might also like to view...

What command enables viewing open firewall ports?

A) netsh firewall show state B) firewall open C) firewall /show all D) firewall /open

Computer Science & Information Technology

What happens if two machines, both listening to the cable, simultaneously decide that it is free and try to send a frame?

What will be an ideal response?

Computer Science & Information Technology