I have this program where I am storing data, which are binary values, into a CString variable. Once I am done storing all data into CString I want to convert it to a binary and than to a int. With this in mind, I want to know if it is possible to convert a CString variable to binary? I tried to just convert the string to int, thinking it would give me the correct value but it didn't. For example, I have the following:
1 2 3 4
CString input = "";
input = "00011"//binary form so int value should be 3
int num = atoi(input)//returned 11 instead of 3