This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

cast a char[] = "" value(s)

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

Parents
  • >> What are we doing wrong, or what requirements are you not stating properly, that has caused you to reject the feedback given thusfar? <<

    first time, excuse me for the multiposting!

    I started the first two threads from the office. But the Firm-Firewall noticed me, that my request cant be sent (this url is blocked from the Firewall). I was convinced, that my Postings are not arrived the Forum.
    Next day i started, this new thread from at home.

    >> Your use of "cast" here in a C forum is quite confusing, since "cast"....<<

    Sorry, I'v just been looking for the easiest way to convert a sequence of character, like example "11101" in a integer-Value. I solved this by dint of pointer before, but was looking for a better way.

    It was stupid from me, to confuse <cast> with <convert>, sorry!

    Thx for your help!

Reply
  • >> What are we doing wrong, or what requirements are you not stating properly, that has caused you to reject the feedback given thusfar? <<

    first time, excuse me for the multiposting!

    I started the first two threads from the office. But the Firm-Firewall noticed me, that my request cant be sent (this url is blocked from the Firewall). I was convinced, that my Postings are not arrived the Forum.
    Next day i started, this new thread from at home.

    >> Your use of "cast" here in a C forum is quite confusing, since "cast"....<<

    Sorry, I'v just been looking for the easiest way to convert a sequence of character, like example "11101" in a integer-Value. I solved this by dint of pointer before, but was looking for a better way.

    It was stupid from me, to confuse <cast> with <convert>, sorry!

    Thx for your help!

Children