Ecosyste.ms: Timeline
Browse the timeline of events for every public repo on GitHub. Data updated hourly from GH Archive.
vremyavnikuda opened a pull request on Dozorcevae/codewars
review @vremyavnikuda
Initial data for student1: Surname: Nevsky Age: 30 Average Grade: 4.5 Enter data for student2: Enter surname: Dozorceva Enter age: 20 Enter average grade: 5 Updated data for student2:...vremyavnikuda commented on a commit on Dozorcevae/codewars
Учитываем если `surname` неинициализированно или удалено если `a.surname == nullptr` -> "Unknown" ```cpp Student operator-(const Student& a, const Student& b){ return Student(a.surname ? ...
vremyavnikuda commented on a commit on Dozorcevae/codewars
проверка на offer.surname==nullptr ```cpp Student& Student::operator=(const Student &other) { if (this != &other) { delete[] surname; surname = other.surname ? new char[str...
vremyavnikuda commented on a commit on Dozorcevae/codewars
Нет проверки на nullptr ``` void Student::SetSurname(const char* s){ delete[] surname; if (s) { surname = new char[strlen(s) + 1]; strcpy(surname, s); } else { ...
vremyavnikuda commented on a commit on Dozorcevae/codewars
комментарий `//освобождаем память для того чтобы записать новую фамилию` к относится к 32 строке или к 33 ? комментарий не на своем месте
vremyavnikuda commented on a commit on Dozorcevae/codewars
исходя из изменений строки 10 обновить деструктор ``` Student::~Student(){ delete[] surname; surname = nullptr; } ```
vremyavnikuda commented on a commit on Dozorcevae/codewars
Добавить проверку на nullptr ``` if (s) { surname = new char[strlen(s) + 1]; strcpy(surname, s); } else { surname = nullptr; } ```
vremyavnikuda commented on a commit on Dozorcevae/codewars
стоит заменить на массив символов так как в этой реализации `surname = new char(strlen(other.surname) + 1);` ты выделяешь память для одного char, инициализированного значением n. используй мас...
vremyavnikuda commented on a commit on Dozorcevae/codewars
add S -> Student std::cout<<"\n Student 4 (after assignment from Student 1): \n";
vremyavnikuda pushed 1 commit to codewars_main vremyavnikuda/codewars
- Create Method_Flow_Diagram.png f14127d