-
Couldn't load subscription status.
- Fork 0
к/р 1.2 задача 3 #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
к/р 1.2 задача 3 #31
Conversation
| // if (!test()) | ||
| // { | ||
| // printf("Программа сейчас не работает\n"); | ||
| // return PROGRAM_FAILED_TESTS; | ||
| // } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:(
| strcpy(copy, string); | ||
| } | ||
| return copy; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strdup?
| char *getString(size_t * const len, FILE * file, char const endOfLine); | ||
| char *copyString(char const * const string); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Надо комментарии
|
|
||
| #include "read.h" | ||
|
|
||
| char *getString(size_t *const len, FILE *file, char const endOfLine); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут точка с запятой лишняя, не компилируется
| const bool test(void) | ||
| { | ||
| const size_t testNumber = 3; | ||
| char const *const testFileNames[testNumber] = {"../tests/testFile1.txt", "../tests/testFile2.txt", "../tests/testFile3.txt"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Стандарт не позволяет так делать, testNumber должен быть константным литералом, объявленным через #define. Не компилится.
No description provided.