472,803 Members | 858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,803 software developers and data experts.

I cannot convert a textBox's text into a c-string

1
Hi. I Have started using Visual C++ 2008 a month ago. I Tried to make a GUI calculator but i cannot convert the textbox's text with the atof() function. The function cannot convert String^ type into a number. How can i convert from a String^ into c-string? Or how can i simple get the value of the textbox's text? By the way what kind of type String^ is? Please help me. Thanks. :-)
Jan 10 '08 #1
1 5252
weaknessforcats
9,208 Expert Mod 8TB
A String^ is a handle to a C++ object created on the garbage collected heap managed by the CLR.

Expand|Select|Wrap|Line Numbers
  1. String^ str = gcnew String("Hello");
  2.  
You use the handle with the -> syntax for C++ pointers.

So, your immediate problem is just converting a String to a C string array of char.

Read up on interoperability here.
Jan 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Paul | last post by:
How would I convert the contents of a textbox into text files. Say I have a textbox containin the following... 13-02-00 - Paul Oakenfold 06-02-00 - William Orbit 30-01-00 - Laurent Garnier...
0
by: Jim Heavey | last post by:
I am using the DataList The ItemTemplate has a button and a label. The label field is bound to a datatable and a field called "Narrative". The button is labeled "Edit". When the edit button is...
1
by: ericvdb | last post by:
Hi all, I'm trying to fill a PDF form with asp.net using the FDF Toolkit. I have a simple form with a textbox and a button. When the button is clicked, the pdf should open with the field filled...
0
by: Mohammad Ali via DotNetMonster.com | last post by:
hi guys, I have a problem with my datagrid. My form is set up so I have two textboxes an add button and an editable datagrid. The datagrid is bound to a datatable which is in my cache.When I...
4
by: Ed | last post by:
Is there a way to convert a richt text box to a textbox? My code lloks like this Dim txtBox as System.Windows.Forms.TextBo dim richTxtBox as System.Windows.Forms.RichTextBo ...
13
by: Jason | last post by:
Could someone here show me how I would write a vb program to convert decimal ip address to binary? For example a small form with a convert button and a label for the result and a textbox for the...
2
by: cindy | last post by:
New to 2.0, using code that works in 1.1, and all works well except cannot get the text out of the textboxes for updating the database. My template column looks like this: <asp:TemplateColumn...
10
by: Gary | last post by:
Hello, Anyone know how to do the following in c# - using inline codeblocks? <% If Request.Form("Name") = "Gary" Then %> <asp:RequiredFieldValidator ID="GarysValidation" ErrorMessage="Gary,...
6
by: Kevin O'Brien | last post by:
Hey guys, I have a textbox where I want to find any spaces in the text and convert them to underscores _. Can someone please give some help with this one? Thank you, Kevin
5
by: BobLaughland | last post by:
Hi There, I am trying to get some fields to align on a web page, like this, To: From: Subject: Each of the fields above have a corresponding asp:Textbox control next to it that I cannot...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.