void employee_set_age(struct Employee* employee, int newAge) {
// Cast away the const and set it's value, the compiler should optimize this for you
(int)&employee->age = newAge;
}
I believe that "Casting away the const" is UB [1]
replies(1):
I believe that "Casting away the const" is UB [1]