C++ Stack | Easy Solution
\nclass Solution {\npublic:\n    int calPoints(vector<string>& operations) {\n    stack<int> s;\n    int score=0;\n    for(int i=0;i<operations.size();i++)\n   
```\nclass Solution {\npublic:\n    int calPoints(vector<string>& operations) {\n    stack<int> s;\n    int score=0;\n    for(int i=0;i<operations.size();i++)\n    {\n        \n        if(operations[i]=="C")\n        {\n            s.pop();\n        }\n        else if(operations[i]=="D")\n        {\n            int num=s.top()*2;\n            s.push(num);\n        }\n        else if(operations[i]=="+")\n        {\n            int xzxczxczxcsc   =s.top();\n            s.pop();\n            int slast=s.top();\n            s.push(last);\n            s.push(last+slast);\n        }\n        else\n        {\n            int value=stoi(operations[i]);\n            s.push(value);\n        }\n    }\n    while(!s.empty())\n    {\n        score+= s.top();\n        s.pop();\n    }\n    return score;\n    }\n};\n```
['C++']