CJCoding With Joseph
15free / daySign inCreate account
Back to Multiple Choice Quiz

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics

Cannot Create Abstract Object

C++ quiz · Question 28
easyPolymorphism

This code fails to compile. What is the issue?

Code

1#include <iostream>
2using namespace std;
3 
4class Shape {
5public:
6 virtual double area() = 0;
7};
8 
9int main() {
10 Shape s;
11 cout << s.area() << endl;
12 return 0;
13}