Results 1 to 6 of 6

Thread: how would i do this

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    how would i do this

    e.g. heres the line in vb

    VB Code:
    1. "IRCVERS IRC8 MSN-OCX!9.02.0310.2401" & VbCrLf & "AUTH GateKeeperPassport I " &  ":GKSSP\0\0\0" & Chr(3)

    how would i convert that to c++ ?

  2. #2
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037

    Re: how would i do this

    An online VB to C++ converter

  3. #3
    Fanatic Member twanvl's Avatar
    Join Date
    Dec 2001
    Posts
    771

    Re: how would i do this

    "IRCVERS IRC8 MSN-OCX!9.02.0310.2401\r\nAUTH GateKeeperPassport I :GKSSP\\0\\0\\0\3" I think, although this line doesn't mean anything without context.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: how would i do this

    thank you very much!!!

    what is the \r\n though? are they escape characters for c++

    and i see you've also put in a backslash \ between a \ and a 0 in the last part of the string, what does this do?
    Last edited by Pouncer; Jan 16th, 2006 at 11:24 AM.

  5. #5
    Fanatic Member twanvl's Avatar
    Join Date
    Dec 2001
    Posts
    771

    Re: how would i do this

    In VB "\" is a string containing a single backslash. In C++ \ is the escape character, it gives a special meaning to the thing following it. To get a string containing just a backslash in C++ you use "\\". vbCrLf is a constant that stands for "cariage return + line feed". These two characters are \r and \n in C++. Finally chr(3) is the character with ascii code 3, in C++ this can be written as \3.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: how would i do this

    thanks alot mate, very usefull info there.

    I guess ill read some tutorials now.

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