Software Development Network>> Visual C++>> How to decide the errors
using
int
Number1 = txt1->Text->ToDouble;
Number2 = txt2->Text->ToDouble(0);Error 1 error C2039: 'ToDouble' : is not a member of 'System::String'sorry my bad english
I'm sorry but you're still not very clear: what exactly are you attempting to do What exactly is your input Note: Double::Parse cannot handle a string of the form "1 + 1.1" it can only handle valid floating-point constants.
{
Double Number1, Number2, Result;
Number2 = txt2->Text->ToDouble(0);
Result = Number1 - Number2;
txtr->Text = Result.ToString();
}This is my code, and i dont now where is the error:(
Number1 = Double::Parse(txt1->Text);Number2 = Double::Parse(txt2->Text);
How to decide the errors
jsndgrss
What is txt1 & txt2 Also, which line is causing the error (line the error is firing on)
In addition, include the exact error you are getting.
Thanks,
Ayman Shoukry
VC++ Team
Modem56k
using
namespace System;int
main(){
String^ str = "3.14";
double d = Double::Parse(str);
Console::WriteLine("d = {0}", d);
}
WillReyn
Smth5ter
LaurentLDI
whats the command to open a other form
John Chen MS
Number1 = txt1->Text->ToDouble;
Number2 = txt2->Text->ToDouble(0);
Error 1 error C2039: 'ToDouble' : is not a member of 'System::String'
sorry my bad english
miguelito928
I'm sorry but you're still not very clear: what exactly are you attempting to do What exactly is your input
Note: Double::Parse cannot handle a string of the form "1 + 1.1" it can only handle valid floating-point constants.
Houman b
{
Double Number1, Number2, Result;
Number1 = txt1->Text->ToDouble;
Number2 = txt2->Text->ToDouble(0);
Result = Number1 - Number2;
txtr->Text = Result.ToString();
}
This is my code, and i dont now where is the error
:(
SJN2K
double number have this format *.** correct
dto
If you think the error is fired while it is not expected, please post a small sample exhibiting the issue.
Thanks,
Ayman Shoukry
VC++ Team
shep58029
the guy who broke it
Try this:
Number1 = Double::Parse(txt1->Text);
Number2 = Double::Parse(txt2->Text);
UncleHarpoon
Jasper Eenhoorn
i have 2 forms, form1 and form2.
in form1 i have a button, and when i click in this button, will open form2.
whats the code to do this