Can someone help me find what I did wrong?
ERROR:1>------ Build started: Project: Right Triangle Solver, Configuration: Debug Win32 ------Code:#pragma once namespace RightTriangleSolver { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Summary for Form1 /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: Add the constructor code here // } protected: /// <summary> /// Clean up any resources being used. /// </summary> ~Form1() { if (components) { delete components; } } protected: private: System::Windows::Forms::Label^ label4; private: System::Windows::Forms::Label^ label1; private: System::Windows::Forms::Label^ label2; private: System::Windows::Forms::Label^ label3; private: System::Windows::Forms::Button^ button3; private: System::Windows::Forms::TextBox^ num1; private: System::Windows::Forms::TextBox^ num2; private: System::Windows::Forms::TextBox^ c; private: System::ComponentModel::IContainer^ components; protected: private: /// <summary> /// Required designer variable. /// </summary> #pragma region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> void InitializeComponent(void) { this->label4 = (gcnew System::Windows::Forms::Label()); this->label1 = (gcnew System::Windows::Forms::Label()); this->label2 = (gcnew System::Windows::Forms::Label()); this->label3 = (gcnew System::Windows::Forms::Label()); this->button3 = (gcnew System::Windows::Forms::Button()); this->num1 = (gcnew System::Windows::Forms::TextBox()); this->num2 = (gcnew System::Windows::Forms::TextBox()); this->c = (gcnew System::Windows::Forms::TextBox()); this->SuspendLayout(); // // label4 // this->label4->AutoSize = true; this->label4->Font = (gcnew System::Drawing::Font(L"Segoe Print", 26.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->label4->ForeColor = System::Drawing::Color::Red; this->label4->Location = System::Drawing::Point(44, 9); this->label4->Name = L"label4"; this->label4->Size = System::Drawing::Size(400, 61); this->label4->TabIndex = 8; this->label4->Text = L"Right Triangle Solver"; // // label1 // this->label1->AutoSize = true; this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->label1->Location = System::Drawing::Point(51, 109); this->label1->Name = L"label1"; this->label1->Size = System::Drawing::Size(32, 31); this->label1->TabIndex = 9; this->label1->Text = L"A"; // // label2 // this->label2->AutoSize = true; this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->label2->Location = System::Drawing::Point(51, 164); this->label2->Name = L"label2"; this->label2->Size = System::Drawing::Size(32, 31); this->label2->TabIndex = 10; this->label2->Text = L"B"; // // label3 // this->label3->AutoSize = true; this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->label3->Location = System::Drawing::Point(49, 221); this->label3->Name = L"label3"; this->label3->Size = System::Drawing::Size(34, 31); this->label3->TabIndex = 11; this->label3->Text = L"C"; // // button3 // this->button3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->button3->Location = System::Drawing::Point(193, 265); this->button3->Name = L"button3"; this->button3->Size = System::Drawing::Size(113, 30); this->button3->TabIndex = 14; this->button3->Text = L"Solve for C!"; this->button3->UseVisualStyleBackColor = true; this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click); // // num1 // this->num1->Location = System::Drawing::Point(165, 106); this->num1->Name = L"num1"; this->num1->Size = System::Drawing::Size(169, 20); this->num1->TabIndex = 15; // // num2 // this->num2->Location = System::Drawing::Point(165, 163); this->num2->Name = L"num2"; this->num2->Size = System::Drawing::Size(169, 20); this->num2->TabIndex = 16; // // c // this->c->Location = System::Drawing::Point(165, 221); this->c->Name = L"c"; this->c->Size = System::Drawing::Size(169, 20); this->c->TabIndex = 17; // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(471, 307); this->Controls->Add(this->c); this->Controls->Add(this->num2); this->Controls->Add(this->num1); this->Controls->Add(this->button3); this->Controls->Add(this->label3); this->Controls->Add(this->label2); this->Controls->Add(this->label1); this->Controls->Add(this->label4); this->Name = L"Form1"; this->Text = L"Form1"; this->ResumeLayout(false); this->PerformLayout(); } #pragma endregion private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void pictureBox1_Click_1(System::Object^ sender, System::EventArgs^ e) { } private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) { this->c = Math::Sqrt(Math::Pow(num1,2)+Math::Pow(num2,2)); } }; }
1>Build started 1/22/2013 1:31:45 PM.
1>InitializeBuildStatus:
1> Touching "Debug\Right Triangle Solver.unsuccessfulbuild".
1>GenerateTargetFrameworkMonikerAttribute:
1>Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
1>ClCompile:
1> All outputs are up-to-date.
1> Right Triangle Solver.cpp
1>c:\users\admin\documents\visual studio 2010\projects\right triangle solver\right triangle solver\Form1.h(215): error C2664: 'System::Math::Pow' : cannot convert parameter 1 from 'System::Windows::Forms::TextBox ^' to 'double'
1> No user-defined-conversion operator available, or
1> There is no context in which this conversion is possible
1>c:\users\admin\documents\visual studio 2010\projects\right triangle solver\right triangle solver\Form1.h(215): error C2664: 'System::Math::Pow' : cannot convert parameter 1 from 'System::Windows::Forms::TextBox ^' to 'double'
1> No user-defined-conversion operator available, or
1> There is no context in which this conversion is possible
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.77
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



1Likes
LinkBack URL
About LinkBacks



