HELP HELP HELP IN VISUAL C++

Nov 27, 2011 at 10:38am
Hello, I am a simple c++ beginner programmer. I am trying to complete a project on Microsoft visual Studio 2008 (the c++ part). I am using a C code to make the calculations and using c++ to make the forms. But I am facing some troubles. They are:
01. I am facing problems converting a string^ to char string (or c string). I don't know any method??

02. I converted the string^ to integers. But how to do in case of double? I used int x = Int32::Parse(String^) to convert to integer. How can I do that?

03. How can I print some lines (Like 3 or 4 lines which is the result of my calculations) on a textbox??


My project submission is on 30th November in the university and my grade depends on it. PLEASE SOMEONE HELP ME IN THIS TIME AND I WOULD BE GRATEFUL TO HIM. ANY KINDS OF HINTS OR SUGGESTIONS WILL HELP ALSO. I AM VERY MUCH TENSED ABOUT IT. PLEASE HELP ME HELP ME HELP ME HELP ME HELP ME....:(:(:(
Nov 27, 2011 at 5:27pm
tanveer094419 wrote:

Hello, I am a simple c++ beginner programmer. I am trying to complete a project on Microsoft visual Studio 2008 (the c++ part). I am using a C code to make the calculations and using c++ to make the forms. But I am facing some troubles. They are:
01. I am facing problems converting a string^ to char string (or c string). I don't know any method??

02. I converted the string^ to integers. But how to do in case of double? I used int x = Int32::Parse(String^) to convert to integer. How can I do that?

03. How can I print some lines (Like 3 or 4 lines which is the result of my calculations) on a textbox??


My project submission is on 30th November in the university and my grade depends on it. PLEASE SOMEONE HELP ME IN THIS TIME AND I WOULD BE GRATEFUL TO HIM. ANY KINDS OF HINTS OR SUGGESTIONS WILL HELP ALSO. I AM VERY MUCH TENSED ABOUT IT. PLEASE HELP ME HELP ME HELP ME HELP ME HELP ME....:(:(:(


You are using C++/CLI. Most of us here aren't used to C++/CLI, just unmanaged C++. You have a better shot @ the MSDN forums.

Having said that, I'll take a shot:

1. Read about .net marshaling. Learn how to marshal a string from managed to unmanaged. I think that will work for ya.
2. There's a Double::Parse() too, ya know?
3. theTextBox->Text = "This is a multi-line managed Sring.\n Line 2."; //Or something like this.

NOTE: For #3, the textbox's Multiline property must be set to True.

You should use Google more. Most of this stuff is found like in 2 minutes.
Last edited on Nov 27, 2011 at 5:28pm
Topic archived. No new replies allowed.