Форум программистов, компьютерный форум, киберфорум
С++ для начинающих
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 5.00/5: Рейтинг темы: голосов - 5, средняя оценка - 5.00
0 / 0 / 0
Регистрация: 30.11.2017
Сообщений: 19

Много ошибок в MVS C++

08.02.2018, 22:06. Показов 1151. Ответов 6
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Вот код:

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
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
#include <iostream> 
#include <string> 
#include <fstream>
 
using namespace std;
using std::cin;
using std::cout;
using std::endl;
 
string SundayPlanner[30];
int sundayI;
 
string MondayPlanner[30];
int mondayI;
 
string TuesdayPlanner[30];
int tuesdayI;
 
string WednesdayPlanner[30];
int wednesdayI;
 
string ThursdayPlanner[30];
int thursdayI;
 
string FridayPlanner[30];
int fridayI;
 
string SaturdayPlanner[30];
int saturdayI;
 
void EditSunday() {
    ofstream sundayFile("sundaySchedule.txt");
    sundayFile << endl;
    sundayFile << "Sunday: ";
    sundayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> SundayPlanner[i];
        sundayFile << k++ << ": ";
        sundayFile << SundayPlanner[i] << "." << endl;
    }
    sundayI = i;
    sundayFile.close();
}
 
void EditMonday() {
    ofstream mondayFile("mondaySchedule.txt");
    mondayFile << endl;
    mondayFile << "Monday: ";
    mondayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> MondayPlanner[i];
        mondayFile << k++ << ": ";
        mondayFile << MondayPlanner[i] << "." << endl;
    }
    mondayI = i;
    mondayFile.close();
}
 
void EditTuesday() {
    ofstream tuesdayFile("tuesdaySchedule.txt");
    tuesdayFile << endl;
    tuesdayFile << "Tuesday: ";
    tuesdayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> TuesdayPlanner[i];
        tuesdayFile << k++ << ": ";
        tuesdayFile << TuesdayPlanner[i] << "." << endl;
    }
    tuesdayI = i;
    tuesdayFile.close();
}
 
void EditWednesday() {
    ofstream wednesdayFile("wednesdaySchedule.txt");
    wednesdayFile << endl;
    wednesdayFile << "Wednesday: ";
    wednesdayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> WednesdayPlanner[i];
        wednesdayFile << k++ << ": ";
        wednesdayFile << WednesdayPlanner[i] << "." << endl;
    }
    wednesdayI = i;
    wednesdayFile.close();
}
 
void EditThursday() {
    ofstream thursdayFile("thursdaySchedule.txt");
    thursdayFile << endl;
    thursdayFile << "Thursday: ";
    thursdayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> ThursdayPlanner[i];
        thursdayFile << k++ << ": ";
        thursdayFile << ThursdayPlanner[i] << "." << endl;
    }
    thursdayI = i;
    thursdayFile.close();
}
 
void EditFriday() {
    ofstream fridayFile("fridaySchedule.txt");
    fridayFile << endl;
    fridayFile << "Friday: ";
    fridayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> FridayPlanner[i];
        fridayFile << k++ << ": ";
        fridayFile << FridayPlanner[i] << "." << endl;
    }
    fridayI = i;
    fridayFile.close();
}
 
void EditSaturday() {
    ofstream saturdayFile("saturdaySchedule.txt");
    saturdayFile << endl;
    saturdayFile << "Saturday: ";
    saturdayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> SaturdayPlanner[i];
        saturdayFile << k++ << ": ";
        saturdayFile << SaturdayPlanner[i] << "." << endl;
    }
    saturdayI = i;
}
 
void Sunday() {
    ifstream sundayFile("sundaySchedule.txt");
    if (!sundayFile.is_open())
        cout << "Unable to open file!\n";
    else {
        char sundayText;
        while (sundayFile.get(sundayText))
            cout << sundayText;
    }
    sundayFile.close();
}
 
void Monday() {
    ifstream mondayFile("mondaySchedule.txt");
    if (!mondayFile.is_open())
        cout << "Unable to open file!\n";
    else {
        char mondayText;
        while (mondayFile.get(mondayText))
            cout << mondayText;
    }
    mondayFile.close();
}
 
void Tuesday() {
    ifstream tuesdayFile("tuesdaySchedule.txt");
    if (!tuesdayFile.is_open())
        cout << "Unable to open file!\n";
    else {
        char tuesdayText;
        while (tuesdayFile.get(tuesdayText))
            cout << tuesdayText;
    tuesdayFile.close();
}
    
    void Wednesday() {
    ifstream wednesdayFile("wednesdaySchedule.txt");
    if (!wednesdayFile.is_open())
        cout << "Unable to open file!\n";
    else {
        char wednesdayText;
        while (wednesdayFile.get(wednesdayText))
            cout << wednesdayText;
    }
    wednesdayFile.close();
}
 
void Thursday() {
    ifstream thursdayFile("thursdaySchedule.txt");
    if (!thursdayFile.is_open())
        cout << "Unable to open file!\n";
    else {
        char thursdayText;
        while (thursdayFile.get(thursdayText))
            cout << thursdayText;
    }
    thursdayFile.close();
}
 
void Friday() {
    ifstream fridayFile("fridaySchedule.txt");
    if (!vFile.is_open())
        cout << "Unable to open file!\n";
    else {
        char fridayText;
        while (fridayFile.get(fridayText))
            cout << fridayText;
    }
    fridayFile.close();
}
 
void Saturday() {
    ifstream saturdayFile("saturdaySchedule.txt");
    if (!saturdayFile.is_open())
        cout << "Unable to open file!\n";
    else {
        char saturdayText;
        while (saturdayFile.get(saturdayText))
            cout << saturdayText;
    }
    vFile.close();
}
 
void General();
void Choice();
 
void EditSchedule() {
    bool a = true;
    while (a) {
        cout << endl;
        cout << "(0 - exit to menu)\n";
        cout << "Select a day: ";
        int a;
        cin >> a;
        cout << endl;
        switch (a)
        {
        case 0:
            Choice();
            break;
        case 1:
            EditSunday();
            break;
        case 2:
            EditMonday();
            break;
        case 3:
            EditTuesday();
            break;
        case 4:
            EditWednesday();
            break;
        case 5:
            EditThursday();
            break;
        case 6:
            EditFriday();
            break;
        case 7:
            EditSaturday();
            break;
        default:
            cout << endl;
            cout << "Error!";
            break;
        }
    }
}
 
void Settings() {
    bool a = true;
    while (a) {
        cout << endl;
        cout << "(0 - exit to menu)\n";
        cout << "Settings:\n";
        cout << endl;
        cout << "1. Edit schedule\n";
        cout << endl;
        cout << "Select: ";
        int num;
        cin >> num;
        cout << endl;
        switch (num)
        {
        case 0:
            Choice();
            break;
        case 1:
            EditSchedule();
            break;
        default:
            cout << endl;
            cout << "Error!";
            break;
        }
 
    }
}
 
void Choice() {
    bool a = true;
    while (a) {
        cout << endl;
        cout << "1. Schedule\n"; cout << "2. Settings\n"; cout << "3. Exit\n";
        cout << "Select: ";
 
        int menu;
        cin >> menu;
        cout << endl;
        switch (menu)
        {
        case 1:
            General();
            break;
        case 2:
            Settings();
            break;
        case 3:
            cout << endl;
            exit(0);
            break;
        default:
            cout << endl;
            cout << "Error!";
            break;
        }
    }
}
 
void General() {
    bool a = true;
    while (a) {
        cout << endl;
        cout << "(0 - exit to menu)\n";
        cout << "Enter the day of the week (number): ";
 
        int dayNumber;
        cin >> dayNumber;
        switch (dayNumber)
        {
        case 0:
            Choice();
            break;
        case 1:
            Sunday();
            break;
        case 2:
            Monday();
            break;
        case 3:
            Tuesday();
            break;
        case 4:
            Wednesday();
            break;
        case 5:
            Thursday();
            break;
        case 6:
            Friday();
            break;
        case 7:
            Saturday();
            break;
        default:
            cout << endl;
            cout << "Error! Enter the correct day of the week!";
        }
    }
}
 
int main() {
    system("color 8B");
    bool a = true;
    cout << "Welcome to Planner!\n";
    while (a) {
        cout << "Enter '0' to exit...\n";
        cout << "Enter '1' to continue...\n";
        cout << endl;
        cout << "Select: ";
        int planner;
        cin >> planner;
        switch (planner)
        {
        case 0:
            exit(0);
            break;
        case 1:
            Choice();
            break;
        default:
            cout << endl << "Error!\n";
            break;
        }
    }
 
    system("pause");
}
Основные ошибки на скриншотах. Ошибки появились после редактирования функций EditSunday...EditSaturday и Sunday...Saturday. Добавил в них работу с файлами, после этого и появились ошибки. Помогите кто чем сможет, пожалуйста! Уж очень устал сам
Миниатюры
Много ошибок в MVS C++   Много ошибок в MVS C++   Много ошибок в MVS C++  

Много ошибок в MVS C++   Много ошибок в MVS C++   Много ошибок в MVS C++  

0
cpp_developer
Эксперт
20123 / 5690 / 1417
Регистрация: 09.04.2010
Сообщений: 22,546
Блог
08.02.2018, 22:06
Ответы с готовыми решениями:

Много ошибок
Подключил библиотеку WinUser.h и появилось 500 ошибок. Помогите) #include &lt;iostream&gt; #include &lt;WinUser.h&gt; #include...

Много ошибок
Пытаюсь перегрузить операторы ввода вывода friend ostream&amp; operator &lt;&lt;(ostream&amp; out, Planet&amp; value); friend istream&amp; operator...

много ошибок
#include &lt;iostream&gt; #include &lt;conio.h&gt; #include &lt;math.h&gt; using namespace std; int main() { const int n = 20; ...

6
0 / 0 / 0
Регистрация: 30.11.2017
Сообщений: 19
08.02.2018, 22:12  [ТС]
Если кому не сложно сами скомпилируйте код у себя и проверьте как работает. Заранее всех благодарю.
0
 Аватар для Avaddon74
571 / 353 / 133
Регистрация: 15.09.2017
Сообщений: 1,239
08.02.2018, 22:13
Лучший ответ Сообщение было отмечено Nelogin как решение

Решение

Проверяй скобки
1
 Аватар для Hitoku
1755 / 1347 / 1407
Регистрация: 28.10.2016
Сообщений: 4,267
08.02.2018, 22:15
Лучший ответ Сообщение было отмечено Nelogin как решение

Решение

Код не запускал, но студия ошибки показывать перестала. Не хватало скобки, а так же Вы запутались в именах некоторых переменных (в исправленных строках добавил комментарии)
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
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
#include <iostream> 
#include <string> 
#include <fstream>
 
using namespace std;
using std::cin;
using std::cout;
using std::endl;
 
string SundayPlanner[30];
int sundayI;
 
string MondayPlanner[30];
int mondayI;
 
string TuesdayPlanner[30];
int tuesdayI;
 
string WednesdayPlanner[30];
int wednesdayI;
 
string ThursdayPlanner[30];
int thursdayI;
 
string FridayPlanner[30];
int fridayI;
 
string SaturdayPlanner[30];
int saturdayI;
 
void EditSunday() {
    ofstream sundayFile("sundaySchedule.txt");
    sundayFile << endl;
    sundayFile << "Sunday: ";
    sundayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> SundayPlanner[i];
        sundayFile << k++ << ": ";
        sundayFile << SundayPlanner[i] << "." << endl;
    }
    sundayI = i;
    sundayFile.close();
}
 
void EditMonday() {
    ofstream mondayFile("mondaySchedule.txt");
    mondayFile << endl;
    mondayFile << "Monday: ";
    mondayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> MondayPlanner[i];
        mondayFile << k++ << ": ";
        mondayFile << MondayPlanner[i] << "." << endl;
    }
    mondayI = i;
    mondayFile.close();
}
 
void EditTuesday() {
    ofstream tuesdayFile("tuesdaySchedule.txt");
    tuesdayFile << endl;
    tuesdayFile << "Tuesday: ";
    tuesdayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> TuesdayPlanner[i];
        tuesdayFile << k++ << ": ";
        tuesdayFile << TuesdayPlanner[i] << "." << endl;
    }
    tuesdayI = i;
    tuesdayFile.close();
}
 
void EditWednesday() {
    ofstream wednesdayFile("wednesdaySchedule.txt");
    wednesdayFile << endl;
    wednesdayFile << "Wednesday: ";
    wednesdayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> WednesdayPlanner[i];
        wednesdayFile << k++ << ": ";
        wednesdayFile << WednesdayPlanner[i] << "." << endl;
    }
    wednesdayI = i;
    wednesdayFile.close();
}
 
void EditThursday() {
    ofstream thursdayFile("thursdaySchedule.txt");
    thursdayFile << endl;
    thursdayFile << "Thursday: ";
    thursdayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> ThursdayPlanner[i];
        thursdayFile << k++ << ": ";
        thursdayFile << ThursdayPlanner[i] << "." << endl;
    }
    thursdayI = i;
    thursdayFile.close();
}
 
void EditFriday() {
    ofstream fridayFile("fridaySchedule.txt");
    fridayFile << endl;
    fridayFile << "Friday: ";
    fridayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> FridayPlanner[i];
        fridayFile << k++ << ": ";
        fridayFile << FridayPlanner[i] << "." << endl;
    }
    fridayI = i;
    fridayFile.close();
}
 
void EditSaturday() {
    ofstream saturdayFile("saturdaySchedule.txt");
    saturdayFile << endl;
    saturdayFile << "Saturday: ";
    saturdayFile << endl;
    cout << endl;
    cout << "Enter the number of cases: ";
    int N;
    cin >> N;
    cout << endl;
    int i;
    int j = 1;
    cout << "Enter the schedule: \n";
    int k = 1;
    for (i = 0; i < N; i++) {
        cout << j++ << ": ";
        cin >> SaturdayPlanner[i];
        saturdayFile << k++ << ": ";
        saturdayFile << SaturdayPlanner[i] << "." << endl;
    }
    saturdayI = i;
}
 
void Sunday() {
    ifstream sundayFile("sundaySchedule.txt");
    if (!sundayFile.is_open())
        cout << "Unable to open file!\n";
    else {
        char sundayText;
        while (sundayFile.get(sundayText))
            cout << sundayText;
    }
    sundayFile.close();
}
 
void Monday() {
    ifstream mondayFile("mondaySchedule.txt");
    if (!mondayFile.is_open())
        cout << "Unable to open file!\n";
    else {
        char mondayText;
        while (mondayFile.get(mondayText))
            cout << mondayText;
    }
    mondayFile.close();
}
 
void Tuesday() {
    ifstream tuesdayFile("tuesdaySchedule.txt");
    if (!tuesdayFile.is_open())
        cout << "Unable to open file!\n";
    else {
        char tuesdayText;
        while (tuesdayFile.get(tuesdayText))
            cout << tuesdayText;
        tuesdayFile.close();
    }
}
 
    void Wednesday() {
        ifstream wednesdayFile("wednesdaySchedule.txt");
        if (!wednesdayFile.is_open())
            cout << "Unable to open file!\n";
        else {
            char wednesdayText;
            while (wednesdayFile.get(wednesdayText))
                cout << wednesdayText;
        }
        wednesdayFile.close();
    }
 
    void Thursday() {
        ifstream thursdayFile("thursdaySchedule.txt");
        if (!thursdayFile.is_open())
            cout << "Unable to open file!\n";
        else {
            char thursdayText;
            while (thursdayFile.get(thursdayText))
                cout << thursdayText;
        }
        thursdayFile.close();
    }
 
    void Friday() {
        ifstream fridayFile("fridaySchedule.txt");
        if (!fridayFile.is_open()) //было !vFile.is_open()
            cout << "Unable to open file!\n";
        else {
            char fridayText;
            while (fridayFile.get(fridayText))
                cout << fridayText;
        }
        fridayFile.close();
    }
 
    void Saturday() {
        ifstream saturdayFile("saturdaySchedule.txt");
        if (!saturdayFile.is_open())
            cout << "Unable to open file!\n";
        else {
            char saturdayText;
            while (saturdayFile.get(saturdayText))
                cout << saturdayText;
        }
        saturdayFile.close(); //было vFile.close();
    }
 
    void General();
    void Choice();
 
    void EditSchedule() {
        bool a = true;
        while (a) {
            cout << endl;
            cout << "(0 - exit to menu)\n";
            cout << "Select a day: ";
            int a;
            cin >> a;
            cout << endl;
            switch (a)
            {
            case 0:
                Choice();
                break;
            case 1:
                EditSunday();
                break;
            case 2:
                EditMonday();
                break;
            case 3:
                EditTuesday();
                break;
            case 4:
                EditWednesday();
                break;
            case 5:
                EditThursday();
                break;
            case 6:
                EditFriday();
                break;
            case 7:
                EditSaturday();
                break;
            default:
                cout << endl;
                cout << "Error!";
                break;
            }
        }
    }
 
    void Settings() {
        bool a = true;
        while (a) {
            cout << endl;
            cout << "(0 - exit to menu)\n";
            cout << "Settings:\n";
            cout << endl;
            cout << "1. Edit schedule\n";
            cout << endl;
            cout << "Select: ";
            int num;
            cin >> num;
            cout << endl;
            switch (num)
            {
            case 0:
                Choice();
                break;
            case 1:
                EditSchedule();
                break;
            default:
                cout << "\nError";
                break;
            }
 
        }
    }
 
    void Choice() {
        bool a = true;
        while (a) {
            cout << endl;
            cout << "1. Schedule\n"; cout << "2. Settings\n"; cout << "3. Exit\n";
            cout << "Select: ";
 
            int menu;
            cin >> menu;
            cout << endl;
            switch (menu)
            {
            case 1:
                General();
                break;
            case 2:
                Settings();
                break;
            case 3:
                cout << endl;
                exit(0);
                break;
            default:
                cout << endl;
                cout << "Error!";
                break;
            }
        }
    }
 
    void General() {
        bool a = true;
        while (a) {
            cout << endl;
            cout << "(0 - exit to menu)\n";
            cout << "Enter the day of the week (number): ";
 
            int dayNumber;
            cin >> dayNumber;
            switch (dayNumber)
            {
            case 0:
                Choice();
                break;
            case 1:
                Sunday();
                break;
            case 2:
                Monday();
                break;
            case 3:
                Tuesday();
                break;
            case 4:
                Wednesday();
                break;
            case 5:
                Thursday();
                break;
            case 6:
                Friday();
                break;
            case 7:
                Saturday();
                break;
            default:
                cout << endl;
                cout << "Error! Enter the correct day of the week!";
            }
        }
    }
 
    int main() {
        system("color 8B");
        bool a = true;
        cout << "Welcome to Planner!\n";
        while (a) {
            cout << "Enter '0' to exit...\n";
            cout << "Enter '1' to continue...\n";
            cout << endl;
            cout << "Select: ";
            int planner;
            cin >> planner;
            switch (planner)
            {
            case 0:
                exit(0);
                break;
            case 1:
                Choice();
                break;
            default:
                cout << endl << "Error!\n";
                break;
            }
        }
 
        system("pause");
    }
1
 Аватар для Avaddon74
571 / 353 / 133
Регистрация: 15.09.2017
Сообщений: 1,239
08.02.2018, 22:15
Лучший ответ Сообщение было отмечено Nelogin как решение

Решение

где-то закрывающую } не поставил
1
0 / 0 / 0
Регистрация: 30.11.2017
Сообщений: 19
08.02.2018, 22:24  [ТС]
Спасибо всем за ответы! Устал видимо и невнимательно писал код . Большинство ошибок устранились, но остались еще 10. Скрины:
Миниатюры
Много ошибок в MVS C++   Много ошибок в MVS C++  
0
0 / 0 / 0
Регистрация: 30.11.2017
Сообщений: 19
08.02.2018, 22:28  [ТС]
Всё!!! Последние ошибки оказались "миражами"! Всем еще раз спасибо
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
08.02.2018, 22:28
Помогаю со студенческими работами здесь

Много ошибок
#include &lt;iostream&gt; using namespace std; double F(double X){ return (pow((sin(X) - 2 * cos(2 * X)), 2)); } int main() { ...

CMake - много ошибок
Здравствуйте. Помогите пожалуйста скомпилировать игру MineTest . У меня не компилится, комп слабый и интернет медленный. Пожалуйста,...

много ошибок при компиляции
Помогите найти ошибки #include &lt;stdio.h&gt; #include &lt;math.h&gt; int main(){ int const n=3; double y={3.0,0.0,0.0}; ...

Очень много ошибок в коде
Помогите пожалуйста исправить ошибки в коде #include &quot;pch.h&quot; #include &lt;iostream&gt; #include &lt;stdio.h&gt; using namespace std; int...

Очень много ошибок в программе
Всем привет. Написал не сложную программу. Нажал F5 и был шокирован #include &lt;cstdlib&gt; #include &lt;iostream&gt; #include...


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

Или воспользуйтесь поиском по форуму:
7
Ответ Создать тему
Новые блоги и статьи
SDL3 для Web (WebAssembly): Обработчик клика мыши в браузере ПК и касания экрана в браузере на мобильном устройстве
8Observer8 02.02.2026
Содержание блога Для начала пошагово создадим рабочий пример для подготовки к экспериментам в браузере ПК и в браузере мобильного устройства. Потом напишем обработчик клика мыши и обработчик. . .
Философия технологии
iceja 01.02.2026
На мой взгляд у человека в технических проектах остается роль генерального директора. Все остальное нейронки делают уже лучше человека. Они не могут нести предпринимательские риски, не могут. . .
SDL3 для Web (WebAssembly): Вывод текста со шрифтом TTF с помощью SDL3_ttf
8Observer8 01.02.2026
Содержание блога В этой пошаговой инструкции создадим с нуля веб-приложение, которое выводит текст в окне браузера. Запустим на Android на локальном сервере. Загрузим Release на бесплатный. . .
SDL3 для Web (WebAssembly): Сборка C/C++ проекта из консоли
8Observer8 30.01.2026
Содержание блога Если вы откроете примеры для начинающих на официальном репозитории SDL3 в папке: examples, то вы увидите, что все примеры используют следующие четыре обязательные функции, а. . .
SDL3 для Web (WebAssembly): Установка Emscripten SDK (emsdk) и CMake для сборки C и C++ приложений в Wasm
8Observer8 30.01.2026
Содержание блога Для того чтобы скачать Emscripten SDK (emsdk) необходимо сначало скачать и уставить Git: Install for Windows. Следуйте стандартной процедуре установки Git через установщик. . . .
SDL3 для Android: Подключение Box2D v3, физика и отрисовка коллайдеров
8Observer8 29.01.2026
Содержание блога Box2D - это библиотека для 2D физики для анимаций и игр. С её помощью можно определять были ли коллизии между конкретными объектами. Версия v3 была полностью переписана на Си, в. . .
Инструменты COM: Сохранение данный из VARIANT в файл и загрузка из файла в VARIANT
bedvit 28.01.2026
Сохранение базовых типов COM и массивов (одномерных или двухмерных) любой вложенности (деревья) в файл, с возможностью выбора алгоритмов сжатия и шифрования. Часть библиотеки BedvitCOM Использованы. . .
SDL3 для Android: Загрузка PNG с альфа-каналом с помощью SDL_LoadPNG (без SDL3_image)
8Observer8 28.01.2026
Содержание блога SDL3 имеет собственные средства для загрузки и отображения PNG-файлов с альфа-каналом и базовой работы с ними. В этой инструкции используется функция SDL_LoadPNG(), которая. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru