CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Convert VB function to C++ / C code

    Quote Originally Posted by jwspring View Post
    Hello,
    I want to convert the following VB function to c/c++ function. I don't know how to deal with VB's Variant variable in C/C++.
    There is no such thing as "Variant" in C++. Also, please use code tags when posting code.

    Forget about the translation line-by-line, and forget about VB right now.

    What exactly do you want to do? Whatever that is, write it in C++. If you did that, there would be no "Variant" coming into play.
    For some reason, I need function to return a char*
    And what is this "char *" supposed to denote?

    The reason for your error is exactly as stated -- a bool is not a char*. So again, tell us what you want to do, not how the old VB code did things.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; May 30th, 2013 at 10:13 AM.

Tags for this Thread

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

Featured