[C++] Short and clean solution
Use a vector/array of size 2. v[0] will be sum of even position digits, v[1] will be sum of odd position digits.The result will be v[0] == v[1]\n# Code\ncpp []\
Use a vector/array of size 2. ```v[0]``` will be sum of even position digits, ```v[1]``` will be sum of odd position digits.The result will be ```v[0] == v[1]```\n# Code\n```cpp []\nclass Solution {\npublic:\n    bool isBalanced(string num) {\n        vector<int>v(2, 0);\n        for (int i = 0; i < num.size(); i++) {\n            v[i % 2] += (num[i] - \'0\');\n        }\n        return v[0] == v[1];\n    }\n};\n```
['C++']