Форум программистов
 

Восстановите пароль или Зарегистрируйтесь на форуме, о проблемах и с заказом рекламы пишите сюда - alarforum@yandex.ru, проверяйте папку спам!

Вернуться   Форум программистов > C/C++ программирование > Visual C++
Регистрация

Восстановить пароль
Повторная активизация e-mail

Купить рекламу на форуме - 42 тыс руб за месяц

Ответ
 
Опции темы Поиск в этой теме
Старый 23.05.2011, 19:02   #1
Flammed
 
Регистрация: 14.05.2011
Сообщений: 4
По умолчанию Ошибки

нужна небольшая помощь, есть ошибки не могу понять, что он имеет ввиду

вот код ниже ошибки

Код:
		}
		int dg;
		float x1,y1,x2,y2; 
		double x,y,min,max,interval;
		array<float>^ a;									
		array<float>^ b;
		Bitmap^ bmp;
		Graphics^ gr;
		String^ FileName; 
		char* StrToChar(System::String^ string) ;
#pragma endregion
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				 dg1->Rows->Clear();
				
				 min=Convert::ToInt32(textBox1->Text);
				  max=Convert::ToInt32(textBox2->Text);
				  interval=Convert::ToInt32(textBox3->Text);
				 for(x=min;x<max;x=x+interval)
				 {
					if (x==1)
						x++;
					if (x==-1)
						x++;
					
					y=sin(x)*x;
						
					dg1->Rows->Add(x,y);

				 }
			 }
private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
			 a = gcnew array<float>(dg->RowCount);
			 b = gcnew array<float>(dg->RowCount);

			
			
			 Pen^ p=gcnew Pen(pictureBox1->BackColor);
			 SolidBrush^ sb=gcnew SolidBrush(pictureBox1->BackColor);
		   gr->FillRectangle(sb,0,0,pictureBox1->Width,pictureBox1->Height);

			
				a[0]=Convert::ToDouble(dg->Rows[0]->Cells[0]->Value)+pictureBox1->Width/2;
				b[0]=Convert::ToDouble(dg->Rows[0]->Cells[1]->Value)+pictureBox1->Height/2;


			 for(int i=0;i<dg->RowCount-1;i++) 
			 {
				x1=Convert::ToDouble(dg->Rows[i]->Cells[0]->Value);
				y1=Convert::ToDouble(dg->Rows[i]->Cells[1]->Value);
				x2=Convert::ToDouble(dg->Rows[i+1]->Cells[0]->Value);
				y2=Convert::ToDouble(dg->Rows[i+1]->Cells[1]->Value);
				x1=x1+pictureBox1->Width/2;
				y1=y1+pictureBox1->Height/2;
				x2=x2+pictureBox1->Width/2;
				y2=y2+pictureBox1->Height/2;


gr->DrawLine(Pens::Black,x1,y1,x2,y2);
a[i+1]=x2;
b[i+1]=y2;
			}
			 pictureBox1->Image=bmp;
			
			 Drawing::Font^ drawFont = gcnew Drawing::Font("Arial", 13);
			
			 {
			 gr->DrawString("X",drawFont,Brushes::Black,400,150);
			gr->DrawString("0",drawFont,Brushes::Black,204,135);
			gr->DrawString("0",drawFont,Brushes::Black,204,10);
			 }
			 
			
		gr->DrawLine (Pens::Black,0, pictureBox1->Height/2, pictureBox1->Width,pictureBox1->Height/2);
			 gr->DrawLine (Pens::Black,pictureBox1->Width/2, 0, pictureBox1->Width/2,pictureBox1->Height);
							 for (int a=0;a<pictureBox1->Width;a+=5)
					gr->DrawLine (Pens::Black,a, pictureBox1->Height/2-3,a,pictureBox1->Height/2+3);

			 for (int a=0;a<pictureBox1->Height;a+=5)
		gr->DrawLine (Pens::Black, pictureBox1->Width/2-3,a,pictureBox1->Width/2+3,a);
			 


			  

		 }
		 
private: System::Void openFileDialog1_FileOk(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
			  openFileDialog1->ShowDialog();
			 Bitmap^ bmp=gcnew Bitmap(openFileDialog1->FileName);
			 pictureBox1->Image=bmp;
		 }
private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
			  bmp=gcnew Bitmap(pictureBox1->Width,pictureBox1->Height);
			 gr=Graphics::FromImage(bmp);
		 }
private: System::Void saveFileDialog1_FileOk(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
			 if(saveFileDialog1->ShowDialog()==Windows::Forms::DialogResult::OK)
			 {
				String^ FileName;
				FileName=saveFileDialog1->FileName;
				float xtab,ytab;
				FILE* f=fopen(StrToChar(FileName),"wb");
				for(int i=0;i<dg1->RowCount;i++)
				{
					xtab=Convert::ToDouble(dg->Rows[i]->Cells[0]->Value);
					ytab=Convert::ToDouble(dg->Rows[i]->Cells[1]->Value);
					fwrite(&xtab,sizeof(float),1,f);
					fwrite(&ytab,sizeof(float),1,f);
				}
				fclose(f);
			 }
		 }
};
}
Flammed вне форума Ответить с цитированием
Старый 23.05.2011, 19:03   #2
Flammed
 
Регистрация: 14.05.2011
Сообщений: 4
По умолчанию Ошибки

Код:
Error	4	error C2227: left of '->Cells' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	276
Error	7	error C2227: left of '->Cells' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	277
Error	11	error C2227: left of '->Cells' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	282
Error	14	error C2227: left of '->Cells' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	283
Error	17	error C2227: left of '->Cells' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	284
Error	20	error C2227: left of '->Cells' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	285
Error	23	error C2227: left of '->Cells' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	339
Error	26	error C2227: left of '->Cells' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	340
Error	1	error C2227: left of '->RowCount' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	266
Error	2	error C2227: left of '->RowCount' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	267
Error	9	error C2227: left of '->RowCount' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	280
Error	3	error C2227: left of '->Rows' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	276
Error	6	error C2227: left of '->Rows' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	277
Error	10	error C2227: left of '->Rows' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	282
Error	13	error C2227: left of '->Rows' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	283
Error	16	error C2227: left of '->Rows' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	284
Error	19	error C2227: left of '->Rows' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	285
Error	22	error C2227: left of '->Rows' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	339
Error	25	error C2227: left of '->Rows' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	340
Error	5	error C2227: left of '->Value' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	276
Error	8	error C2227: left of '->Value' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	277
Error	12	error C2227: left of '->Value' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	282
Error	15	error C2227: left of '->Value' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	283
Error	18	error C2227: left of '->Value' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	284
Error	21	error C2227: left of '->Value' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	285
Error	24	error C2227: left of '->Value' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	339
Error	27	error C2227: left of '->Value' must point to class/struct/union/generic type	c:\users\silence\documents\visual studio 2005\projects\kursovaja\kursovaja\Form1.h	340
Flammed вне форума Ответить с цитированием
Ответ


Купить рекламу на форуме - 42 тыс руб за месяц



Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Ошибки Дим@@ Помощь студентам 4 06.11.2010 23:36
ошибки almazz Помощь студентам 0 15.04.2010 16:34
Ошибки Groz Помощь студентам 11 20.08.2009 16:41
Ошибки delphin100 Операционные системы общие вопросы 12 17.04.2008 14:15