Cevelop objects to char junk
as an "un-initialized variable". What is the correct way to address the issue in this case?
friend std::ostream& operator<<(std::ostream& os_a, College& college_a) {
return os_a << college_a.id_ + ' ' + college_a.name_;
}
friend std::istream& operator>>(std::istream& is_a, College& college_a) {
char junk;
return is_a >> college_a.id_ >> std::noskipws
>> junk, std::getline(is_a, college_a.name_); // name: between 1st space and endofline.
}