CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    61

    Smile Strings and Character Pointers..

    Hi,
    I am very new to Visual C++.
    I am developing a very simple windows form application.
    I have included a cpp file which processes all the logic.

    When the function returns, i also need to process the character pointer back to string type in a label..
    I guess this would be the solution:

    this->label1->text = System::String(var).ToString();

    But to do this, I have a textbox in the form and I need to pass a string as a character pointer to the cpp file..

    how to do this?


    What if I have a character array in the cpp file??
    What would be the code to return character arrays and convert them to string to display in labels or textboxes??
    And the vice versa, that is how to convert the strings in a label or textbox to convert to character arrays and pass them to the cpp file???

    Kindly help..

  2. #2
    Join Date
    Feb 2008
    Posts
    61

    Re: Strings and Character Pointers..

    Please help me someone..

  3. #3
    Join Date
    Feb 2008
    Posts
    61

    Unhappy Re: Strings and Character Pointers..

    Hi,
    I am very new to Visual C++.
    I am developing a very simple windows form application.
    I have included a cpp file which processes all the logic.

    When the function returns, i also need to process the character pointer back to string type in a label..
    I guess this would be the solution:

    this->label1->text = System::String(var).ToString();

    But to do this, I have a textbox in the form and I need to pass a string as a character pointer to the cpp file..

    how to do this?


    What if I have a character array in the cpp file??
    What would be the code to return character arrays and convert them to string to display in labels or textboxes??
    And the vice versa, that is how to convert the strings in a label or textbox to convert to character arrays and pass them to the cpp file???

    Kindly help..

  4. #4
    Join Date
    Oct 2007
    Location
    Fredericksburg, VA
    Posts
    41

    Re: Strings and Character Pointers..

    Sorry this is the wrong forum, I know for one I'm not very familiar with windows forms and managed c++, you should move this post to the managed c++ forum for a better response.

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