hi Forum! I have declared an char-array, for a simple Data stream buffer of bits: char data[] = "101101010011111@". And now just want cast this items to a integer-value. How can i do this in simplest way, without sum the bits bitwise via pointer? cu O. Swid
You cannot "cast" an array of characters (or a C string, or an idiosyncratic string format with an '@' on the end). You can convert strings to integers with various functions, as I've mentioned before. The C cast operator and syntax will not avail you. (... Flame of Udun. And unless you get this assignment right: you... SHALL NOT... PASS!)
Ah, I neglected to mention Drew's contributions to the problem here: http://www.keil.com/forum/docs/thread4250.asp And that again begs the question: What are we doing wrong, or what requirements are you not stating properly, that has caused you to reject the feedback given thusfar?