Ask coding questions

← Back to all posts
inheritance
varungogwal (0)

if you look into the code on the line 49 and 69 it's not executing it's not inheriting the value of total can anyone please help

Comments
hotnewtop
Highwayman (1482)

It works fine for me, the only error that you have to fix is:

 clang++-7 -pthread -std=c++17 -o main main.cpp
main.cpp:106:68: warning: unknown escape sequence '\ '
      [-Wunknown-escape-sequence]
  cout<<"\ncard holder:"<<NM<<"\ncard no:"<<CN<<"\nexpiry:"<<CM<<" \ "<<...
                                                                   ^~
main.cpp:138:1: error: expected statement
}
^
1 warning and 1 error generated.
exit status 1

which is on line 106.