Results 1 to 6 of 6

Thread: Simple question(extremely)

  1. #1

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Simple question(extremely)

    I'm converting c++ code to VB and I'm a newbie so....

    how would I put this in VB terms?

    byte b = (byte)inStr.charAt(i);

    instr is a string, i'm guessing charat does a mid$(string,i,1)

    Help!

    Thanks,

  2. #2
    That looks like Java to me but:
    VB Code:
    1. Dim b As String * 1
    2. b = Mid$(inStr, i, 1)

  3. #3

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    I need b as a byte.

    So would I Asc it?

    Also ^ does power in c++ right?

  4. #4
    There is no power operator in C++, you've got to make your own or use stuff from math.h.

    A byte is a value from 0 to 255 when unsigned so my string declaration should be right.

  5. #5

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Filburt, check your private messages I sent you something, please help me.

    Thanks

  6. #6
    jim mcnamara
    Guest
    ^ is the xor operator.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width