1 2 3 4 5 6 7 8 9 10 11
#include <iostream> using namespace std; class Total { //cin>>sub1 //cin>>sub2 //cin>>sub3 float sub1,sub2,sub3; total=sub1+sub2+sub3; cout<<"Total="<<total }
1 2
Line 9: error: 'Total::sub1' cannot appear in a constant-expression compilation terminated due to -Wfatal-errors.