hi i have an string array in which i have combinations of 0's and 1's like on index 0 i have "01", on index 1 i have "11", on index 2 i have "00", on index 3 i have"10" etc is their any possibilty that i can take these values as binary and then convert them into decimal like
01 = 1
11 = 3
00 = 0
10 = 2
let me clear i am not talking about connverting string to binary i want that string as binary
thanks in advance:)
de Source
0
Light Poster
Recommended Answers
Jump to PostA way to do what I guess you want is:
string str; int i = -1; str = "10"; // value of a certain index in your stringarray switch ( str) { case "00": i = 0; break; case "01": i = 1; break; case "10": i …
All 3 Replies
ddanbe
2,724
Professional Procrastinator
Featured Poster
de Source
0
Light Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.