Форум программистов, компьютерный форум, киберфорум
C++/CLI
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.53/15: Рейтинг темы: голосов - 15, средняя оценка - 4.53
0 / 0 / 1
Регистрация: 01.12.2010
Сообщений: 34

Ошибки (необъявленные идентификаторы)

16.03.2014, 01:29. Показов 3096. Ответов 1
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Что блин за ошибки? Че ему не нравится?
C++ (Qt)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
#pragma once
 
double xn,xk,xh,a,x,y,ymax,ymin,yt;
int i,k,j;
int m;
#include <math.h>
#include "Form2.h"
 
namespace Lab3_1 {
 
    using namespace System;
    using namespace System::ComponentModel;
    using namespace System::Collections;
    using namespace System::Windows::Forms;
    using namespace System::Data;
    using namespace System::Drawing;
    using namespace System::Windows::Forms::DataVisualization::Charting;
 
    /// <summary>
    /// Сводка для Form1
    /// </summary>
    public ref class Form1 : public System::Windows::Forms::Form
    {
    public:
        Form1(void)
        {
            InitializeComponent();
            //
            //TODO: добавьте код конструктора
            //
        }
 
    protected:
        /// <summary>
        /// Освободить все используемые ресурсы.
        /// </summary>
        ~Form1()
        {
            if (components)
            {
                delete components;
            }
        }
    private: System::Windows::Forms::MenuStrip^  menuStrip1;
    protected: 
    private: System::Windows::Forms::ToolStripMenuItem^  файлToolStripMenuItem;
 
 
    private: System::Windows::Forms::ToolStripSeparator^  toolStripSeparator;
    private: System::Windows::Forms::ToolStripMenuItem^  сохранитьToolStripMenuItem;
 
    private: System::Windows::Forms::ToolStripSeparator^  toolStripSeparator1;
 
 
    private: System::Windows::Forms::ToolStripSeparator^  toolStripSeparator2;
    private: System::Windows::Forms::ToolStripMenuItem^  выходToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  правкаToolStripMenuItem;
 
    private: System::Windows::Forms::ToolStripMenuItem^  отменадействияToolStripMenuItem1;
    private: System::Windows::Forms::ToolStripSeparator^  toolStripSeparator3;
    private: System::Windows::Forms::ToolStripMenuItem^  вырезатьToolStripMenuItem;
 
 
 
 
    private: System::Windows::Forms::ToolStripMenuItem^  сервисToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  цветТекстаToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  цветФонаЯчеекToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  высотаСтрокToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  ширинаСтолбцовToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  параметрыШрифтаЗаголовкаToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  цветШрифтаЗаголовкаToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  цветГрафикаToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  цветФонаГрафикаToolStripMenuItem;
    private: System::Windows::Forms::Button^  button1;
    private: System::Windows::Forms::TabControl^  tabControl1;
    private: System::Windows::Forms::TabPage^  tabPage1;
    private: System::Windows::Forms::TextBox^  textBox4;
    private: System::Windows::Forms::TextBox^  textBox3;
    private: System::Windows::Forms::TextBox^  textBox2;
    private: System::Windows::Forms::TextBox^  textBox1;
    private: System::Windows::Forms::Label^  label5;
    private: System::Windows::Forms::Label^  label4;
    private: System::Windows::Forms::Label^  label3;
    private: System::Windows::Forms::Label^  label2;
    private: System::Windows::Forms::Label^  label1;
    private: System::Windows::Forms::TabPage^  tabPage2;
    private: System::Windows::Forms::TextBox^  textBox6;
    private: System::Windows::Forms::TextBox^  textBox5;
    private: System::Windows::Forms::Label^  label8;
    private: System::Windows::Forms::Label^  label7;
    private: System::Windows::Forms::Label^  label6;
    private: System::Windows::Forms::DataGridView^  dataGridView1;
    private: System::Windows::Forms::TabPage^  tabPage3;
    private: System::Windows::Forms::DataVisualization::Charting::Chart^  chart1;
    private: System::Windows::Forms::ColorDialog^  colorDialog1;
    private: System::Windows::Forms::FontDialog^  fontDialog1;
 
 
 
 
 
 
 
 
 
    protected: 
 
 
 
 
 
 
    private:
        /// <summary>
        /// Требуется переменная конструктора.
        /// </summary>
        System::ComponentModel::Container ^components;
 
#pragma region Windows Form Designer generated code
        /// <summary>
        /// Обязательный метод для поддержки конструктора - не изменяйте
        /// содержимое данного метода при помощи редактора кода.
        /// </summary>
        void InitializeComponent(void)
        {
            System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
            System::Windows::Forms::DataVisualization::Charting::ChartArea^  chartArea1 = (gcnew System::Windows::Forms::DataVisualization::Charting::ChartArea());
            System::Windows::Forms::DataVisualization::Charting::Legend^  legend1 = (gcnew System::Windows::Forms::DataVisualization::Charting::Legend());
            System::Windows::Forms::DataVisualization::Charting::Series^  series1 = (gcnew System::Windows::Forms::DataVisualization::Charting::Series());
            this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
            this->файлToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->toolStripSeparator = (gcnew System::Windows::Forms::ToolStripSeparator());
            this->сохранитьToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->toolStripSeparator1 = (gcnew System::Windows::Forms::ToolStripSeparator());
            this->toolStripSeparator2 = (gcnew System::Windows::Forms::ToolStripSeparator());
            this->выходToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->правкаToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->отменадействияToolStripMenuItem1 = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->цветТекстаToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->цветФонаЯчеекToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->высотаСтрокToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->ширинаСтолбцовToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->параметрыШрифтаЗаголовкаToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->цветШрифтаЗаголовкаToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->toolStripSeparator3 = (gcnew System::Windows::Forms::ToolStripSeparator());
            this->вырезатьToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->цветГрафикаToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->цветФонаГрафикаToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->сервисToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->button1 = (gcnew System::Windows::Forms::Button());
            this->tabControl1 = (gcnew System::Windows::Forms::TabControl());
            this->tabPage1 = (gcnew System::Windows::Forms::TabPage());
            this->textBox4 = (gcnew System::Windows::Forms::TextBox());
            this->textBox3 = (gcnew System::Windows::Forms::TextBox());
            this->textBox2 = (gcnew System::Windows::Forms::TextBox());
            this->textBox1 = (gcnew System::Windows::Forms::TextBox());
            this->label5 = (gcnew System::Windows::Forms::Label());
            this->label4 = (gcnew System::Windows::Forms::Label());
            this->label3 = (gcnew System::Windows::Forms::Label());
            this->label2 = (gcnew System::Windows::Forms::Label());
            this->label1 = (gcnew System::Windows::Forms::Label());
            this->tabPage2 = (gcnew System::Windows::Forms::TabPage());
            this->textBox6 = (gcnew System::Windows::Forms::TextBox());
            this->textBox5 = (gcnew System::Windows::Forms::TextBox());
            this->label8 = (gcnew System::Windows::Forms::Label());
            this->label7 = (gcnew System::Windows::Forms::Label());
            this->label6 = (gcnew System::Windows::Forms::Label());
            this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());
            this->tabPage3 = (gcnew System::Windows::Forms::TabPage());
            this->chart1 = (gcnew System::Windows::Forms::DataVisualization::Charting::Chart());
            this->colorDialog1 = (gcnew System::Windows::Forms::ColorDialog());
            this->fontDialog1 = (gcnew System::Windows::Forms::FontDialog());
            this->menuStrip1->SuspendLayout();
            this->tabControl1->SuspendLayout();
            this->tabPage1->SuspendLayout();
            this->tabPage2->SuspendLayout();
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->dataGridView1))->BeginInit();
            this->tabPage3->SuspendLayout();
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->chart1))->BeginInit();
            this->SuspendLayout();
            // 
            // menuStrip1
            // 
            this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(3) {this->файлToolStripMenuItem, 
                this->правкаToolStripMenuItem, this->сервисToolStripMenuItem});
            this->menuStrip1->Location = System::Drawing::Point(0, 0);
            this->menuStrip1->Name = L"menuStrip1";
            this->menuStrip1->Size = System::Drawing::Size(565, 24);
            this->menuStrip1->TabIndex = 0;
            this->menuStrip1->Text = L"menuStrip1";
            // 
            // файлToolStripMenuItem
            // 
            this->файлToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(5) {this->toolStripSeparator, 
                this->сохранитьToolStripMenuItem, this->toolStripSeparator1, this->toolStripSeparator2, this->выходToolStripMenuItem});
            this->файлToolStripMenuItem->Name = L"файлToolStripMenuItem";
            this->файлToolStripMenuItem->Size = System::Drawing::Size(48, 20);
            this->файлToolStripMenuItem->Text = L"&Файл";
            // 
            // toolStripSeparator
            // 
            this->toolStripSeparator->Name = L"toolStripSeparator";
            this->toolStripSeparator->Size = System::Drawing::Size(305, 6);
            // 
            // сохранитьToolStripMenuItem
            // 
            this->сохранитьToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"сохранитьToolStripMenuItem.Image")));
            this->сохранитьToolStripMenuItem->ImageTransparentColor = System::Drawing::Color::Magenta;
            this->сохранитьToolStripMenuItem->Name = L"сохранитьToolStripMenuItem";
            this->сохранитьToolStripMenuItem->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::S));
            this->сохранитьToolStripMenuItem->Size = System::Drawing::Size(308, 22);
            this->сохранитьToolStripMenuItem->Text = L"&Сохранить данные таблицы в файл";
            this->сохранитьToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::сохранитьToolStripMenuItem_Click);
            // 
            // toolStripSeparator1
            // 
            this->toolStripSeparator1->Name = L"toolStripSeparator1";
            this->toolStripSeparator1->Size = System::Drawing::Size(305, 6);
            // 
            // toolStripSeparator2
            // 
            this->toolStripSeparator2->Name = L"toolStripSeparator2";
            this->toolStripSeparator2->Size = System::Drawing::Size(305, 6);
            // 
            // выходToolStripMenuItem
            // 
            this->выходToolStripMenuItem->Name = L"выходToolStripMenuItem";
            this->выходToolStripMenuItem->Size = System::Drawing::Size(308, 22);
            this->выходToolStripMenuItem->Text = L"Вы&ход";
            this->выходToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::выходToolStripMenuItem_Click);
            // 
            // правкаToolStripMenuItem
            // 
            this->правкаToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(3) {this->отменадействияToolStripMenuItem1, 
                this->toolStripSeparator3, this->вырезатьToolStripMenuItem});
            this->правкаToolStripMenuItem->Name = L"правкаToolStripMenuItem";
            this->правкаToolStripMenuItem->Size = System::Drawing::Size(39, 20);
            this->правкаToolStripMenuItem->Text = L"Вид";
            // 
            // отменадействияToolStripMenuItem1
            // 
            this->отменадействияToolStripMenuItem1->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(6) {this->цветТекстаToolStripMenuItem, 
                this->цветФонаЯчеекToolStripMenuItem, this->высотаСтрокToolStripMenuItem, this->ширинаСтолбцовToolStripMenuItem, this->параметрыШрифтаЗаголовкаToolStripMenuItem, 
                this->цветШрифтаЗаголовкаToolStripMenuItem});
            this->отменадействияToolStripMenuItem1->Name = L"отменадействияToolStripMenuItem1";
            this->отменадействияToolStripMenuItem1->Size = System::Drawing::Size(121, 22);
            this->отменадействияToolStripMenuItem1->Text = L"Таблица";
            // 
            // цветТекстаToolStripMenuItem
            // 
            this->цветТекстаToolStripMenuItem->Name = L"цветТекстаToolStripMenuItem";
            this->цветТекстаToolStripMenuItem->Size = System::Drawing::Size(244, 22);
            this->цветТекстаToolStripMenuItem->Text = L"Цвет текста";
            this->цветТекстаToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::цветТекстаToolStripMenuItem_Click);
            // 
            // цветФонаЯчеекToolStripMenuItem
            // 
            this->цветФонаЯчеекToolStripMenuItem->Name = L"цветФонаЯчеекToolStripMenuItem";
            this->цветФонаЯчеекToolStripMenuItem->Size = System::Drawing::Size(244, 22);
            this->цветФонаЯчеекToolStripMenuItem->Text = L"Цвет фона ячеек";
            this->цветФонаЯчеекToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::цветФонаЯчеекToolStripMenuItem_Click);
            // 
            // высотаСтрокToolStripMenuItem
            // 
            this->высотаСтрокToolStripMenuItem->Name = L"высотаСтрокToolStripMenuItem";
            this->высотаСтрокToolStripMenuItem->Size = System::Drawing::Size(244, 22);
            this->высотаСтрокToolStripMenuItem->Text = L"Высота строк";
            this->высотаСтрокToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::высотаСтрокToolStripMenuItem_Click);
            // 
            // ширинаСтолбцовToolStripMenuItem
            // 
            this->ширинаСтолбцовToolStripMenuItem->Name = L"ширинаСтолбцовToolStripMenuItem";
            this->ширинаСтолбцовToolStripMenuItem->Size = System::Drawing::Size(244, 22);
            this->ширинаСтолбцовToolStripMenuItem->Text = L"Ширина столбцов";
            this->ширинаСтолбцовToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::ширинаСтолбцовToolStripMenuItem_Click);
            // 
            // параметрыШрифтаЗаголовкаToolStripMenuItem
            // 
            this->параметрыШрифтаЗаголовкаToolStripMenuItem->Name = L"параметрыШрифтаЗаголовкаToolStripMenuItem";
            this->параметрыШрифтаЗаголовкаToolStripMenuItem->Size = System::Drawing::Size(244, 22);
            this->параметрыШрифтаЗаголовкаToolStripMenuItem->Text = L"Параметры шрифта заголовка";
            this->параметрыШрифтаЗаголовкаToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::параметрыШрифтаЗаголовкаToolStripMenuItem_Click);
            // 
            // цветШрифтаЗаголовкаToolStripMenuItem
            // 
            this->цветШрифтаЗаголовкаToolStripMenuItem->Name = L"цветШрифтаЗаголовкаToolStripMenuItem";
            this->цветШрифтаЗаголовкаToolStripMenuItem->Size = System::Drawing::Size(244, 22);
            this->цветШрифтаЗаголовкаToolStripMenuItem->Text = L"Цвет шрифта заголовка";
            this->цветШрифтаЗаголовкаToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::цветШрифтаЗаголовкаToolStripMenuItem_Click);
            // 
            // toolStripSeparator3
            // 
            this->toolStripSeparator3->Name = L"toolStripSeparator3";
            this->toolStripSeparator3->Size = System::Drawing::Size(118, 6);
            // 
            // вырезатьToolStripMenuItem
            // 
            this->вырезатьToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) {this->цветГрафикаToolStripMenuItem, 
                this->цветФонаГрафикаToolStripMenuItem});
            this->вырезатьToolStripMenuItem->ImageTransparentColor = System::Drawing::Color::Magenta;
            this->вырезатьToolStripMenuItem->Name = L"вырезатьToolStripMenuItem";
            this->вырезатьToolStripMenuItem->Size = System::Drawing::Size(121, 22);
            this->вырезатьToolStripMenuItem->Text = L"График";
            // 
            // цветГрафикаToolStripMenuItem
            // 
            this->цветГрафикаToolStripMenuItem->Name = L"цветГрафикаToolStripMenuItem";
            this->цветГрафикаToolStripMenuItem->Size = System::Drawing::Size(181, 22);
            this->цветГрафикаToolStripMenuItem->Text = L"Цвет графика";
            this->цветГрафикаToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::цветГрафикаToolStripMenuItem_Click);
            // 
            // цветФонаГрафикаToolStripMenuItem
            // 
            this->цветФонаГрафикаToolStripMenuItem->Name = L"цветФонаГрафикаToolStripMenuItem";
            this->цветФонаГрафикаToolStripMenuItem->Size = System::Drawing::Size(181, 22);
            this->цветФонаГрафикаToolStripMenuItem->Text = L"Цвет фона графика";
            this->цветФонаГрафикаToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::цветФонаГрафикаToolStripMenuItem_Click);
            // 
            // сервисToolStripMenuItem
            // 
            this->сервисToolStripMenuItem->Name = L"сервисToolStripMenuItem";
            this->сервисToolStripMenuItem->Size = System::Drawing::Size(53, 20);
            this->сервисToolStripMenuItem->Text = L"Выход";
            this->сервисToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::сервисToolStripMenuItem_Click);
            // 
            // button1
            // 
            this->button1->Location = System::Drawing::Point(13, 248);
            this->button1->Name = L"button1";
            this->button1->Size = System::Drawing::Size(533, 37);
            this->button1->TabIndex = 1;
            this->button1->Text = L"Выход";
            this->button1->UseVisualStyleBackColor = true;
            this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
            // 
            // tabControl1
            // 
            this->tabControl1->Controls->Add(this->tabPage1);
            this->tabControl1->Controls->Add(this->tabPage2);
            this->tabControl1->Controls->Add(this->tabPage3);
            this->tabControl1->Dock = System::Windows::Forms::DockStyle::Top;
            this->tabControl1->Location = System::Drawing::Point(0, 24);
            this->tabControl1->Name = L"tabControl1";
            this->tabControl1->SelectedIndex = 0;
            this->tabControl1->Size = System::Drawing::Size(565, 186);
            this->tabControl1->TabIndex = 2;
            this->tabControl1->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::tabControl1_SelectedIndexChanged);
            // 
            // tabPage1
            // 
            this->tabPage1->Controls->Add(this->textBox4);
            this->tabPage1->Controls->Add(this->textBox3);
            this->tabPage1->Controls->Add(this->textBox2);
            this->tabPage1->Controls->Add(this->textBox1);
            this->tabPage1->Controls->Add(this->label5);
            this->tabPage1->Controls->Add(this->label4);
            this->tabPage1->Controls->Add(this->label3);
            this->tabPage1->Controls->Add(this->label2);
            this->tabPage1->Controls->Add(this->label1);
            this->tabPage1->Location = System::Drawing::Point(4, 22);
            this->tabPage1->Name = L"tabPage1";
            this->tabPage1->Padding = System::Windows::Forms::Padding(3);
            this->tabPage1->Size = System::Drawing::Size(557, 160);
            this->tabPage1->TabIndex = 0;
            this->tabPage1->Text = L"Ввод данных";
            this->tabPage1->UseVisualStyleBackColor = true;
            // 
            // textBox4
            // 
            this->textBox4->Location = System::Drawing::Point(221, 120);
            this->textBox4->Name = L"textBox4";
            this->textBox4->Size = System::Drawing::Size(100, 20);
            this->textBox4->TabIndex = 8;
            // 
            // textBox3
            // 
            this->textBox3->Location = System::Drawing::Point(221, 94);
            this->textBox3->Name = L"textBox3";
            this->textBox3->Size = System::Drawing::Size(100, 20);
            this->textBox3->TabIndex = 7;
            // 
            // textBox2
            // 
            this->textBox2->Location = System::Drawing::Point(221, 69);
            this->textBox2->Name = L"textBox2";
            this->textBox2->Size = System::Drawing::Size(100, 20);
            this->textBox2->TabIndex = 6;
            // 
            // textBox1
            // 
            this->textBox1->Location = System::Drawing::Point(221, 43);
            this->textBox1->Name = L"textBox1";
            this->textBox1->Size = System::Drawing::Size(100, 20);
            this->textBox1->TabIndex = 5;
            // 
            // label5
            // 
            this->label5->AutoSize = true;
            this->label5->Location = System::Drawing::Point(15, 123);
            this->label5->Name = L"label5";
            this->label5->Size = System::Drawing::Size(194, 13);
            this->label5->TabIndex = 4;
            this->label5->Text = L"Введите положительное значение А:";
            // 
            // label4
            // 
            this->label4->AutoSize = true;
            this->label4->Location = System::Drawing::Point(15, 101);
            this->label4->Name = L"label4";
            this->label4->Size = System::Drawing::Size(95, 13);
            this->label4->TabIndex = 3;
            this->label4->Text = L"Введите шаг ХН=";
            // 
            // label3
            // 
            this->label3->AutoSize = true;
            this->label3->Location = System::Drawing::Point(15, 76);
            this->label3->Name = L"label3";
            this->label3->Size = System::Drawing::Size(172, 13);
            this->label3->TabIndex = 2;
            this->label3->Text = L"Введите конечное значение ХК=";
            // 
            // label2
            // 
            this->label2->AutoSize = true;
            this->label2->Location = System::Drawing::Point(15, 50);
            this->label2->Name = L"label2";
            this->label2->Size = System::Drawing::Size(179, 13);
            this->label2->TabIndex = 1;
            this->label2->Text = L"Введите начальное значение XN=";
            // 
            // label1
            // 
            this->label1->AutoSize = true;
            this->label1->Location = System::Drawing::Point(94, 14);
            this->label1->Name = L"label1";
            this->label1->Size = System::Drawing::Size(137, 13);
            this->label1->TabIndex = 0;
            this->label1->Text = L"Ввод данных промежутка";
            // 
            // tabPage2
            // 
            this->tabPage2->Controls->Add(this->textBox6);
            this->tabPage2->Controls->Add(this->textBox5);
            this->tabPage2->Controls->Add(this->label8);
            this->tabPage2->Controls->Add(this->label7);
            this->tabPage2->Controls->Add(this->label6);
            this->tabPage2->Controls->Add(this->dataGridView1);
            this->tabPage2->Location = System::Drawing::Point(4, 22);
            this->tabPage2->Name = L"tabPage2";
            this->tabPage2->Padding = System::Windows::Forms::Padding(3);
            this->tabPage2->Size = System::Drawing::Size(557, 160);
            this->tabPage2->TabIndex = 1;
            this->tabPage2->Text = L"Таблица данных промежутка";
            this->tabPage2->UseVisualStyleBackColor = true;
            // 
            // textBox6
            // 
            this->textBox6->Location = System::Drawing::Point(332, 129);
            this->textBox6->Name = L"textBox6";
            this->textBox6->Size = System::Drawing::Size(100, 20);
            this->textBox6->TabIndex = 5;
            // 
            // textBox5
            // 
            this->textBox5->Location = System::Drawing::Point(339, 59);
            this->textBox5->Name = L"textBox5";
            this->textBox5->Size = System::Drawing::Size(100, 20);
            this->textBox5->TabIndex = 4;
            // 
            // label8
            // 
            this->label8->AutoSize = true;
            this->label8->Location = System::Drawing::Point(336, 98);
            this->label8->Name = L"label8";
            this->label8->Size = System::Drawing::Size(174, 13);
            this->label8->TabIndex = 3;
            this->label8->Text = L"Минимальное значение функции";
            // 
            // label7
            // 
            this->label7->AutoSize = true;
            this->label7->Location = System::Drawing::Point(336, 43);
            this->label7->Name = L"label7";
            this->label7->Size = System::Drawing::Size(180, 13);
            this->label7->TabIndex = 2;
            this->label7->Text = L"Максимальное значение функции";
            // 
            // label6
            // 
            this->label6->AutoSize = true;
            this->label6->Location = System::Drawing::Point(138, 13);
            this->label6->Name = L"label6";
            this->label6->Size = System::Drawing::Size(267, 13);
            this->label6->TabIndex = 1;
            this->label6->Text = L"Таблица значений функции на промежутке [XN;XK]";
            // 
            // dataGridView1
            // 
            this->dataGridView1->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
            this->dataGridView1->Location = System::Drawing::Point(17, 43);
            this->dataGridView1->Name = L"dataGridView1";
            this->dataGridView1->Size = System::Drawing::Size(181, 104);
            this->dataGridView1->TabIndex = 0;
            // 
            // tabPage3
            // 
            this->tabPage3->Controls->Add(this->chart1);
            this->tabPage3->Location = System::Drawing::Point(4, 22);
            this->tabPage3->Name = L"tabPage3";
            this->tabPage3->Padding = System::Windows::Forms::Padding(3);
            this->tabPage3->Size = System::Drawing::Size(557, 160);
            this->tabPage3->TabIndex = 2;
            this->tabPage3->Text = L"График функции на промежутке";
            this->tabPage3->UseVisualStyleBackColor = true;
            // 
            // chart1
            // 
            chartArea1->Name = L"ChartArea1";
            this->chart1->ChartAreas->Add(chartArea1);
            legend1->Name = L"Legend1";
            this->chart1->Legends->Add(legend1);
            this->chart1->Location = System::Drawing::Point(13, 8);
            this->chart1->Name = L"chart1";
            series1->ChartArea = L"ChartArea1";
            series1->ChartType = System::Windows::Forms::DataVisualization::Charting::SeriesChartType::Spline;
            series1->Legend = L"Legend1";
            series1->Name = L"Series1";
            this->chart1->Series->Add(series1);
            this->chart1->Size = System::Drawing::Size(528, 139);
            this->chart1->TabIndex = 0;
            this->chart1->Text = L"chart1";
            // 
            // Form1
            // 
            this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
            this->ClientSize = System::Drawing::Size(565, 291);
            this->Controls->Add(this->tabControl1);
            this->Controls->Add(this->button1);
            this->Controls->Add(this->menuStrip1);
            this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedToolWindow;
            this->Name = L"Form1";
            this->Text = L"Выполнил студент группы К12-2 Моисеенко Валерия";
            this->menuStrip1->ResumeLayout(false);
            this->menuStrip1->PerformLayout();
            this->tabControl1->ResumeLayout(false);
            this->tabPage1->ResumeLayout(false);
            this->tabPage1->PerformLayout();
            this->tabPage2->ResumeLayout(false);
            this->tabPage2->PerformLayout();
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->dataGridView1))->EndInit();
            this->tabPage3->ResumeLayout(false);
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->chart1))->EndInit();
            this->ResumeLayout(false);
            this->PerformLayout();
 
        }
#pragma endregion
 
private: System::Void сервисToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
             Application::Exit();
         }
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
             Application::Exit();
         }
private: System::Void выходToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
             Application::Exit();
         }
private: System::Void tabControl1_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
             double xn,xk,xh,x,y,a,ymax,ymin,yt;
             int n,i;
             Series^ plot1=chart1->Series[0];
             plot1->Points->Clear();
             if ((textBox1->Text!="")&&(textBox2->Text!="")&&(textBox3->Text!="")&&(textBox4->Text!="")){
                 xn = Convert::ToDouble(textBox1->Text);
                 xk = Convert::ToDouble(textBox2->Text);
                 xh = Convert::ToDouble(textBox3->Text);
                  a = Convert::ToDouble(textBox4->Text);
                  if ((xn>=xk)||(xh>(xk-xn))) {MessageBox::Show("Данные заполнены неверно","Ошибка ввода данных",MessageBoxButtons::OK,
                      MessageBoxIcon::Exclamation); }
                  else
                  {x=xn;
                  dataGridView1->Columns->Clear();
                  dataGridView1->ColumnCount = 2;
                  dataGridView1->Rows->Add(ceil((xk-xn)/xh)+1);
                  dataGridView1->Rows[0]->Cells[0]->Value=Convert::ToString("x");
                  dataGridView1->Rows[0]->Cells[1]->Value=Convert::ToString("y");
                  i = 1;
                  x=xn;ymax=-1.8e307;ymin=1.8e307;
                  while (x<=xk)
                  {
                      if (x<=0) { y=sin(x*x*x)*sin(x*x*x); }
                      else
                          if (x<=a) {y=pow(6*x-x*x+1,1/5);}
                          else
                              if (x>a) { y=sin(x); }
                              plot1->Points->AddXY(x,y);
                              dataGridView1->Rows[i]->Cells[0]->Value=Convert::ToString(x);
                              yt=ceil(y*100)/100;
                              dataGridView1->Rows[i]->Cells[1]->Value=Convert::ToString(yt);
                              if (y>ymax) ymax=ceil(y*100)/100;
                              if (y<ymin) ymin=ceil(y*100)/100;
                              x=x+xh;
                              i++;}}
                  textBox5->Text = Convert::ToString(ymax);
                  textBox6->Text = Convert::ToString(ymin);
             }
             else
             {MessageBox::Show("Заполните данные","Ошибка ввода данные",MessageBoxButtons::OK,MessageBoxIcon::Exclamation);}
         }
private: System::Void цветТекстаToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
             if(colorDialog1->ShowDialog()==System::Windows::Forms::DialogResult::OK)
             {dataGridView1->DefaultCellStyle->ForeColor=colorDialog1->Color;}
         }
private: System::Void цветФонаЯчеекToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
             if (colorDialog1->ShowDialog()==System::Windows::Forms::DialogResult::OK)
             {dataGridView1->DefaultCellStyle->BackColor=colorDialog1->Color;}
         }
private: System::Void высотаСтрокToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
             form2^ f = gcnew form2();
             this->Hide();
             f->ShowDialog();
             this->Show();
             for (int i=0;i<dataGridView1->RowCount;i++)
             {DataGridViewRow^ row=dataGridView1->Rows[i];
             row->Height=h;}
         }
private: System::Void ширинаСтолбцовToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
             form2^ f = gcnew form2();
             this->Hide();
             f->ShowDialog();
             this->Show();
             for (int i=0;i<dataGridView1->ColumnCount; i++)
             {DataGridViewColumn^ column = dataGridView1->Columns[i];
             column->Width=m;}
         }
private: System::Void параметрыШрифтаЗаголовкаToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
             if (fontDialog1->ShowDialog()==System::Windows::Forms::DialogResult::OK)
             {label6->Font=fontDialog1->Font;}
         }
private: System::Void цветШрифтаЗаголовкаToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
             if (colorDialog1->ShowDialog()==System::Windows::Forms::DialogResult::OK)
             {label6->ForeColor=colorDialog1->Color;}
         }
private: System::Void цветГрафикаToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
             Series^ plot1=chart1->Series[0];
             if(colorDialog1->ShowDialog()==System::Windows::Forms::DialogResult::OK)
                 plot1->Color=colorDialog1->Color;
         }
private: System::Void цветФонаГрафикаToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
              Series^ plot1=chart1->Series[0];
             if(colorDialog1->ShowDialog()==System::Windows::Forms::DialogResult::OK)
             {   chart1->BackColor=colorDialog1->Color;}
         }
private: System::Void сохранитьToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
             SaveFileDialog ^saveFileDialog1=gcnew SaveFileDialog();
             saveFileDialog1->Filter="Text File|*.txt";
             saveFileDialog1->FilterIndex=2;
             saveFileDialog1->RestoreDirectory=true;
             if (saveFileDialog1->ShowDialog()==System::Windows::Forms::DialogResult::OK)
             {
                 StreamWriter^ pwriter=gcnew StreamWriter (saveFileDialog1->FileName);
                 for (int i=0;i<dataGridView1->RowCount;i++)
                     pwriter->WriteLine(dataGridView1->Rows[i]->Cells[0]->Value->ToString()+"   |   "+dataGridView1->Rows[i]->Cells[1]->
                     Value->ToString());
                 pwriter->Close();}
         }
};
}
Добавлено через 1 минуту
Предупреждение 1 warning C4244: аргумент: преобразование "double" в "int", возможна потеря данных f:\лабораторная 2\lab3_1\lab3_1\Form1.h 587
Предупреждение 2 warning C4101: n: неиспользованная локальная переменная f:\лабораторная 2\lab3_1\lab3_1\Form1.h 573
Ошибка 3 error C2065: StreamWriter: необъявленный идентификатор f:\лабораторная 2\lab3_1\lab3_1\Form1.h 664
Ошибка 4 error C2065: pwriter: необъявленный идентификатор f:\лабораторная 2\lab3_1\lab3_1\Form1.h 664
Ошибка 5 error C2061: синтаксическая ошибка: идентификатор "StreamWriter" f:\лабораторная 2\lab3_1\lab3_1\Form1.h 664
Ошибка 6 error C2065: pwriter: необъявленный идентификатор f:\лабораторная 2\lab3_1\lab3_1\Form1.h 666
Ошибка 7 error C2227: выражение слева от "->WriteLine" должно указывать на тип класса, структуры или объединения либо на универсальный тип f:\лабораторная 2\lab3_1\lab3_1\Form1.h 666
Ошибка 8 error C2065: pwriter: необъявленный идентификатор f:\лабораторная 2\lab3_1\lab3_1\Form1.h 668
Ошибка 9 error C2227: выражение слева от "->Close" должно указывать на тип класса, структуры или объединения либо на универсальный тип f:\лабораторная 2\lab3_1\lab3_1\Form1.h 668
0
cpp_developer
Эксперт
20123 / 5690 / 1417
Регистрация: 09.04.2010
Сообщений: 22,546
Блог
16.03.2014, 01:29
Ответы с готовыми решениями:

необъявленные идентификаторы
в виндовс форме пишет ошибки необъевдленный идентификатор в private: void ShowDB()private: void ShowDB() { SqlCeEngine^ engine =...

При компилировании синтаксические ошибки и необъявленные идентификаторы
#include &lt;stdio.h&gt; #include &lt;conio.h&gt; #include &lt;locale&gt; #include &lt;stdlib.h&gt; # define N 15; int main() { int a, i, j=0, i1=0,...

Необъявленные идентификаторы
Пишу простенькую программу по контесту на codeforces, писал до этого на Dev C++, что-то дернуло использовать Visual Studio 17 Создал...

1
Заблокирован
16.03.2014, 09:02
Например, для StreamWriter нужно подключить пространство имён System::IO.
Это вверху, где using.
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
16.03.2014, 09:02
Помогаю со студенческими работами здесь

Ошибка: Необъявленные идентификаторы
ошибку выдает: q1,q2 не объявленные идентификаторы? но они же объявлены) думаю, наверное, надо вначале как-нибудь объявить. но как, если...

Необъявленные идентификаторы ProxyHost и ProxyPort
Unit1.pas(46): Undeclared identifier: 'ProxyHost' Unit1.pas(47): Undeclared identifier: 'ProxyPort' unit Unit1; interface ...

Вложенные циклы и необъявленные идентификаторы
есть часть кода: for(int a=0; a&lt;3;a++) if (a=0) int b=1; else if (a=1) int b=2; else if (a=2) int b=3; for(int c=0;...

Программа не компилируется (необъявленные идентификаторы)
есть программа, на С, выдает куча ошибок связанные с необъявленными идентификаторами и тд. Помогите исправить скорее всего я думаю это в...

Ошибки в коде - идентификаторы GetUserNameEx, NameSamCompatible, counUserFNameBuffer не определены
Ошибки в 61 и 62 строках кода - идентификаторы GetUserNameEx, NameSamCompatible, counUserFNameBuffer не определены. Выполнялось это к 1...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
Новые блоги и статьи
Символьное дифференцирование
igorrr37 13.02.2026
/ * Программа принимает математическое выражение в виде строки и выдаёт его производную в виде строки и вычисляет значение производной при заданном х Логарифм записывается как: (x-2)log(x^2+2) -. . .
Камера Toupcam IUA500KMA
Eddy_Em 12.02.2026
Т. к. у всяких "хикроботов" слишком уж мелкий пиксель, для подсмотра в ESPriF они вообще плохо годятся: уже 14 величину можно рассмотреть еле-еле лишь на экспозициях под 3 секунды (а то и больше),. . .
И ясному Солнцу
zbw 12.02.2026
И ясному Солнцу, и светлой Луне. В мире покоя нет и люди не могут жить в тишине. А жить им немного лет.
«Знание-Сила»
zbw 12.02.2026
«Знание-Сила» «Время-Деньги» «Деньги -Пуля»
SDL3 для Web (WebAssembly): Подключение Box2D v3, физика и отрисовка коллайдеров
8Observer8 12.02.2026
Содержание блога Box2D - это библиотека для 2D физики для анимаций и игр. С её помощью можно определять были ли коллизии между конкретными объектами и вызывать обработчики событий столкновения. . . .
SDL3 для Web (WebAssembly): Загрузка PNG с прозрачным фоном с помощью SDL_LoadPNG (без SDL3_image)
8Observer8 11.02.2026
Содержание блога Библиотека SDL3 содержит встроенные инструменты для базовой работы с изображениями - без использования библиотеки SDL3_image. Пошагово создадим проект для загрузки изображения. . .
SDL3 для Web (WebAssembly): Загрузка PNG с прозрачным фоном с помощью SDL3_image
8Observer8 10.02.2026
Содержание блога Библиотека SDL3_image содержит инструменты для расширенной работы с изображениями. Пошагово создадим проект для загрузки изображения формата PNG с альфа-каналом (с прозрачным. . .
Установка Qt-версии Lazarus IDE в Debian Trixie Xfce
volvo 10.02.2026
В общем, достали меня глюки IDE Лазаруса, собранной с использованием набора виджетов Gtk2 (конкретно: если набирать текст в редакторе и вызвать подсказку через Ctrl+Space, то после закрытия окошка. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru