← Back to Question List
C++ Quiz #28
Cannot Create Abstract Object
This code fails to compile. What is the issue?
📄 Code
1#include <iostream>2using namespace std;34class Shape {5public:6 virtual double area() = 0;7};89int main() {10 Shape s;11 cout << s.area() << endl;12 return 0;13}