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

Разберите Error

09.10.2020, 22:52. Показов 464. Ответов 0
Метки c++ (Все метки)

Студворк — интернет-сервис помощи студентам
Я начинающий программист на c++ помогите разобраться с error
C++
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
#pragma once
 
namespace Project2 {
 
    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::IO;
 
    /// <summary>
    /// Сводка для MyForm
    /// </summary>
    public ref class MyForm : public System::Windows::Forms::Form
    {
    public:
        MyForm(void)
        {
            InitializeComponent();
            //
            //TODO: добавьте код конструктора
            //
        }
 
    protected:
        /// <summary>
        /// Освободить все используемые ресурсы.
        /// </summary>
        ~MyForm()
        {
            if (components)
            {
                delete components;
            }
        }
 
    protected:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
    private: System::Windows::Forms::Label^ label1;
    private: System::Windows::Forms::DataGridView^ dataGridView1;
    private: System::Windows::Forms::DataGridViewCheckBoxColumn^ Готов;
    private: System::Windows::Forms::DataGridViewTextBoxColumn^ Имя;
    private: System::Windows::Forms::DataGridViewTextBoxColumn^ Номер;
    private: System::Windows::Forms::DataGridViewTextBoxColumn^ Адрес;
    private: System::Windows::Forms::DataGridViewTextBoxColumn^ Причина;
    private: System::Windows::Forms::DataGridViewTextBoxColumn^ ДатаПос;
    private: System::Windows::Forms::DataGridViewTextBoxColumn^ ДатаРеш;
    private: System::Windows::Forms::MenuStrip^ menuStrip1;
    private: System::Windows::Forms::ToolStripMenuItem^ файлToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^ сохранитьToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^ удалитьToolStripMenuItem;
    private: System::Windows::Forms::OpenFileDialog^ openFileDialog1;
    private: System::Windows::Forms::SaveFileDialog^ saveFileDialog1;
 
    private: System::ComponentModel::IContainer^ components;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
    private:
        /// <summary>
        /// Обязательная переменная конструктора.
        /// </summary>
 
 
#pragma region Windows Form Designer generated code
        /// <summary>
        /// Требуемый метод для поддержки конструктора — не изменяйте 
        /// содержимое этого метода с помощью редактора кода.
        /// </summary>
        void InitializeComponent(void)
        {
            System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(MyForm::typeid));
            this->label1 = (gcnew System::Windows::Forms::Label());
            this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());
            this->Готов = (gcnew System::Windows::Forms::DataGridViewCheckBoxColumn());
            this->Имя = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
            this->Номер = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
            this->Адрес = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
            this->Причина = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
            this->ДатаПос = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
            this->ДатаРеш = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
            this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
            this->файлToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->сохранитьToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->удалитьToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
            this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog());
            this->saveFileDialog1 = (gcnew System::Windows::Forms::SaveFileDialog());
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->dataGridView1))->BeginInit();
            this->menuStrip1->SuspendLayout();
            this->SuspendLayout();
            // 
            // label1
            // 
            resources->ApplyResources(this->label1, L"label1");
            this->label1->BackColor = System::Drawing::Color::White;
            this->label1->Name = L"label1";
            // 
            // dataGridView1
            // 
            this->dataGridView1->AllowUserToOrderColumns = true;
            this->dataGridView1->BackgroundColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)),
                static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(255)));
            this->dataGridView1->BorderStyle = System::Windows::Forms::BorderStyle::None;
            this->dataGridView1->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
            this->dataGridView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^  >(7) {
                this->Готов,
                    this->Имя, this->Номер, this->Адрес, this->Причина, this->ДатаПос, this->ДатаРеш
            });
            resources->ApplyResources(this->dataGridView1, L"dataGridView1");
            this->dataGridView1->Name = L"dataGridView1";
            // 
            // Готов
            // 
            resources->ApplyResources(this->Готов, L"Готов");
            this->Готов->Name = L"Готов";
            // 
            // Имя
            // 
            resources->ApplyResources(this->Имя, L"Имя");
            this->Имя->Name = L"Имя";
            // 
            // Номер
            // 
            resources->ApplyResources(this->Номер, L"Номер");
            this->Номер->Name = L"Номер";
            // 
            // Адрес
            // 
            resources->ApplyResources(this->Адрес, L"Адрес");
            this->Адрес->Name = L"Адрес";
            // 
            // Причина
            // 
            resources->ApplyResources(this->Причина, L"Причина");
            this->Причина->Name = L"Причина";
            // 
            // ДатаПос
            // 
            resources->ApplyResources(this->ДатаПос, L"ДатаПос");
            this->ДатаПос->Name = L"ДатаПос";
            // 
            // ДатаРеш
            // 
            resources->ApplyResources(this->ДатаРеш, L"ДатаРеш");
            this->ДатаРеш->Name = L"ДатаРеш";
            // 
            // menuStrip1
            // 
            this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(1) { this->файлToolStripMenuItem });
            resources->ApplyResources(this->menuStrip1, L"menuStrip1");
            this->menuStrip1->Name = L"menuStrip1";
            // 
            // файлToolStripMenuItem
            // 
            this->файлToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) {
                this->сохранитьToolStripMenuItem,
                    this->удалитьToolStripMenuItem
            });
            this->файлToolStripMenuItem->Name = L"файлToolStripMenuItem";
            resources->ApplyResources(this->файлToolStripMenuItem, L"файлToolStripMenuItem");
            // 
            // сохранитьToolStripMenuItem
            // 
            this->сохранитьToolStripMenuItem->Name = L"сохранитьToolStripMenuItem";
            resources->ApplyResources(this->сохранитьToolStripMenuItem, L"сохранитьToolStripMenuItem");
            this->сохранитьToolStripMenuItem->Click += gcnew System::EventHandler(this, &MyForm::сохранитьToolStripMenuItem_Click);
            // 
            // удалитьToolStripMenuItem
            // 
            this->удалитьToolStripMenuItem->Name = L"удалитьToolStripMenuItem";
            resources->ApplyResources(this->удалитьToolStripMenuItem, L"удалитьToolStripMenuItem");
            this->удалитьToolStripMenuItem->Click += gcnew System::EventHandler(this, &MyForm::удалитьToolStripMenuItem_Click);
            // 
            // openFileDialog1
            // 
            this->openFileDialog1->FileName = L"openFileDialog1";
            // 
            // MyForm
            // 
            resources->ApplyResources(this, L"$this");
            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
            this->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(255)),
                static_cast<System::Int32>(static_cast<System::Byte>(255)));
            this->Controls->Add(this->dataGridView1);
            this->Controls->Add(this->label1);
            this->Controls->Add(this->menuStrip1);
            this->MainMenuStrip = this->menuStrip1;
            this->Name = L"MyForm";
            this->Load += gcnew System::EventHandler(this, &MyForm::MyForm_Load);
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->dataGridView1))->EndInit();
            this->menuStrip1->ResumeLayout(false);
            this->menuStrip1->PerformLayout();
            this->ResumeLayout(false);
            this->PerformLayout();
 
        }
#pragma endregion
    private: System::Void MyForm_Load(System::Object^ sender, System::EventArgs^ e) {
    }
    private: System::Void textBox5_TextChanged(System::Object^ sender, System::EventArgs^ e) {
    }
private: System::Void textBox9_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox14_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox39_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox41_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox38_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox26_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void checkBox4_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void checkBox3_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void checkBox2_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox3_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox13_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox15_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void checkBox7_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox17_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox20_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox22_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox27_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox32_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox33_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox34_TextChanged(System::Object^ sender, System::EventArgs^ e) {
 
}
private: System::Void textBox40_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void label4_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void label8_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void сохранитьToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void удалитьToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
    Stream mystr = null;
    if (openFileDialog1.showdialog() == DialogResult.OK) {
        if ((mystr = OpenFileDialog1.openfile()) != null) {
 
            StreamReader myread = new StreamReader(mystr);
            String[]; str;
            int num = 0;
            try{ 
                string[]; str1 = myread.ReadToEnd().split('\n');
                num = str1.count();
                dataGridView1.rowcount = num;
                for (int i = 0; i < num; i++) {
 
                    str = str1[].split('^');
                    for (int j = 0; j < dataGridView1.columncount; j++) {
                        try {
                            dataGridView1->Rows[i]->Cells[j].Value = str[j];
                        }
                    }
                }
            }
            catch {}
        }
    }
}
       catch (exception ex) {
           MessageBox.show(ex.massage);
       }
       finally {
           myread.close();
       }
};
}
0
Programming
Эксперт
39485 / 9562 / 3019
Регистрация: 12.04.2006
Сообщений: 41,671
Блог
09.10.2020, 22:52
Ответы с готовыми решениями:

Исправить ошибку в WxDev-C++: Error with debugging process: GDB Error: error, No source file named main.cpp
Здравствуйте товарищи! Новенький я в си, установил wxDev-C++, скомпилировал, запускаешь - работает, а чтоб пошагово отладка - не...

Error LNK1120, error LNK2019, error LNK2028, queue
// свойство класса Parser queue&lt;elem*&gt;* postfix = new queue&lt;elem*&gt;; // строка, из-за которой происходит ошибка ...

Ошибка в тестовом примере: "Error 1 error C2143: syntax error : missing ';' before 'if'"
#include&lt;iostream&gt; using namespace std; int main(){ int x, a = 0, b = 10; (cin &gt;&gt; x).get(); while (x){ int c = x % 10; ...

0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
inter-admin
Эксперт
29715 / 6470 / 2152
Регистрация: 06.03.2009
Сообщений: 28,500
Блог
09.10.2020, 22:52
Помогаю со студенческими работами здесь

Error 1 error C2664: 'CharToOemW' : cannot convert parameter 1 from 'const char *' to 'LPCWSTR'
выдает вот такую ошибку - Error 1 error C2664: 'CharToOemW' : cannot convert parameter 1 from 'const char *' to 'LPCWSTR' использую visual...

[Error] cannot convert 'Node*' to 'int*' in initialization и [Error] request for member 'next' in '* p', which is of non
#include&lt;iostream&gt; #include&lt;cstdlib&gt; #include&lt;ctime&gt; using namespace std; struct Node { int data; Node*...

Error C2061: syntax error : identifier 'scanf' как исправить?
Помогите неумному студенту, пожалуйста. Только началось программирование в моей жизни, пока не совсем понимаю, что происходит Прога...

Ошибка error C2146: syntax error : missing ';' before identifier 'alph'
Не получается откомпилировать прогу из консоля в MFC, выбивает ошибку error C2146: syntax error : missing ';' before identifier 'alph' ...

Выдает ошибки : [Error] 'else' without a previous 'if' и [Error] expected unqualified-id before 'return'
#include &lt;ctype.h&gt; #include&lt;iostream&gt; #include&lt;conio.h&gt; #include&lt;stdlib.h&gt; #include&lt;windows.h&gt; #include&lt;string.h&gt; ...


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

Или воспользуйтесь поиском по форуму:
1
Ответ Создать тему
Новые блоги и статьи
Модульный подход на примере F#
DevAlt 06.03.2026
В блоге дяди Боба наткнулся на такое определение: В этой книге («Подход, основанный на вариантах использования») Ивар утверждает, что архитектура программного обеспечения — это структуры,. . .
Управление камерой с помощью скрипта OrbitControls.js на Three.js: Вращение, зум и панорамирование
8Observer8 05.03.2026
Содержание блога Финальная демка в браузере работает на Desktop и мобильных браузерах. Итоговый код: orbit-controls-threejs-js. zip. Сканируйте QR-код на мобильном. Вращайте камеру одним пальцем,. . .
SDL3 для Web (WebAssembly): Синхронизация спрайтов SDL3 и тел Box2D
8Observer8 04.03.2026
Содержание блога Финальная демка в браузере. Итоговый код: finish-sync-physics-sprites-sdl3-c. zip На первой гифке отладочные линии отключены, а на второй включены:. . .
SDL3 для Web (WebAssembly): Идентификация объектов на Box2D v3 - использование userData и событий коллизий
8Observer8 02.03.2026
Содержание блога Финальная демка в браузере. Итоговый код: finish-collision-events-sdl3-c. zip Сканируйте QR-код на мобильном и вы увидите, что появится джойстик для управления главным героем. . . .
Реалии
Hrethgir 01.03.2026
Нет, я не закончил до сих пор симулятор. Эта задача сложнее. Не получилось уйти в плавсостав, но оно и к лучшему, возможно. Точнее получалось - но сварщиком в палубную команду, а это значит, в моём. . .
Ритм жизни
kumehtar 27.02.2026
Иногда приходится жить в ритме, где дел становится всё больше, а вовлечения в происходящее — всё меньше. Плотный график не даёт вниманию закрепиться ни на одном событии. Утро начинается с быстрых,. . .
SDL3 для Web (WebAssembly): Сборка библиотек: SDL3, Box2D, FreeType, SDL3_ttf, SDL3_mixer и SDL3_image из исходников с помощью CMake и Emscripten
8Observer8 27.02.2026
Недавно вышла версия 3. 4. 2 библиотеки SDL3. На странице официальной релиза доступны исходники, готовые DLL (для x86, x64, arm64), а также библиотеки для разработки под Android, MinGW и Visual Studio. . . .
SDL3 для Web (WebAssembly): Реализация движения на Box2D v3 - трение и коллизии с повёрнутыми стенами
8Observer8 20.02.2026
Содержание блога Box2D позволяет легко создать главного героя, который не проходит сквозь стены и перемещается с заданным трением о препятствия, которые можно располагать под углом, как верхнее. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru