binary.to_string() the catch is here !thats it and yea bitset<32>binary(n)  :D
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    vector<int> evenOddBit(int n) {\n        vector<int>ans;\n\n        std::bitset<32> binary(n);\n\n        \n        int even=0;\n        int odd=0;\n        // std::string binaryStr = binary.to_string();\n\n         string s=binary.to_string();\n\n        for(int i=0;i<s.length();i++)\n        {\n            if(i%2!=0&&s[i]==\'1\')\n               even++;\n            else if(i%2==0&&s[i]==\'1\')\n              odd++;\n        }\n\n        ans.push_back(even);\n        ans.push_back(odd);\n        return ans;\n    }\n};\n```
['C++']