C++ gcc编译器错误:stl_construct.h,stl_uninitialized.h

C++ gcc编译器错误:stl_construct.h,stl_uninitialized.h,c++,C++,我创建了两个类(学生和课程): #包括 #包括 #包括 #包括 #包括 #包括 #包括 使用名称空间std; 班级学生{ 私人: 字符串名; 整数; int测试_1; int检验2; 公众: //建造商: Student(字符串名、int matr_num、int test_1、int test_2); //析构函数: ~Student(); //复制构造函数: 学生(康斯特学生和其他); //复印助理: 学生运算符=(常量学生和其他); //移动构造函数: 学生(学生和其他); //移动助理:

我创建了两个类(学生和课程):

#包括
#包括
#包括
#包括
#包括
#包括
#包括
使用名称空间std;
班级学生{
私人:
字符串名;
整数;
int测试_1;
int检验2;
公众:
//建造商:
Student(字符串名、int matr_num、int test_1、int test_2);
//析构函数:
~Student();
//复制构造函数:
学生(康斯特学生和其他);
//复印助理:
学生运算符=(常量学生和其他);
//移动构造函数:
学生(学生和其他);
//移动助理:
学生运算符=(学生和其他);
//两次测试的平均值:
双重检验平均值();
//获取姓名、matrikel_编号、考试分数:
字符串get_name()常量;
双get_matr_num()常量;
双get_test_1()常量;
双get_test_2()常量;
};
//建造师
Student::Student(字符串名、int matr_num、int test_1、int test_2)
:name{name},matr_num{matr_num},test_1{test_1},test_2{test_2}
{
}
//析构函数
学生::~Student(){
}
//复制构造函数:
学生::学生(康斯特学生和其他)
:name{other.name},matr_num{other.matr_num},test_1{other.test_1},test_2{other.test_2}
{
}
//复印助理:
学生::运算符=(常量学生和其他)
{
name=other.name;
matr_num=other.matr_num;
测试_1=其他。测试_1;
测试_2=其他。测试_2;
}   
//移动构造函数:
学生::学生(学生和其他)
:name{other.name},matr_num{other.matr_num},test_1{other.test_1},test_2{other.test_2}
{
其他名称=”;
other.matr_num=0;
其他测试_1=0;
其他测试_2=0;
}       
//移动助理:
学生::运算符=(学生和其他)
{
name=other.name;
matr_num=other.matr_num;
测试_1=其他。测试_1;
测试_2=其他。测试_2;
其他名称=”;
other.matr_num=0;
其他测试_1=0;
其他测试_2=0;
}   
双人学生::测试平均值(){
返回(测试1+测试2)/2;
}
字符串Student::get_name()常量{return name;}
双重学生::get_matr_num()常量{return matr_num;}
double Student::get_test_1()const{return test_1;}
double Student::get_test_2()const{return test_2;}
//课程类别:
班级课程{
私人:
弦滴度;
向量表;
公众:
//默认构造函数:
课程(字符串滴度);
//建造商:
课程(弦乐、矢量学生);
//析构函数:
~Course(){};
//复制构造函数:
课程(康斯特课程和其他课程);
//复印助理:
航向操作员=(常数航向和其他);
//移动构造函数:
课程(课程和其他);
//移动助理:
课程操作员=(课程和其他);
//测试1的平均if课程:
双ave_测试_1(){
双结果=0;

对于(int i=0;i而言,问题在于构造函数:

Course::Course(string titel)
: titel{titel}
, stud_list{0}{} <--- in here
Course::Course(字符串titel)
:titel{titel}
,stud_list{0}{}阅读有关
n file included from /usr/include/c++/7/vector:62:0,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_construct.h: In instantiation of ‘void std::_Construct(_T1*, _Args&& ...) [with _T1 = Student; _Args = {}]’:
/usr/include/c++/7/bits/stl_uninitialized.h:527:18:   required from ‘static _ForwardIterator std::__uninitialized_default_n_1<_TrivialValueType>::__uninit_default_n(_ForwardIterator, _Size) [with _ForwardIterator = Student*; _Size = long unsigned int; bool _TrivialValueType = false]’
/usr/include/c++/7/bits/stl_uninitialized.h:583:20:   required from ‘_ForwardIterator std::__uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = Student*; _Size = long unsigned int]’
/usr/include/c++/7/bits/stl_uninitialized.h:645:44:   required from ‘_ForwardIterator std::__uninitialized_default_n_a(_ForwardIterator, _Size, std::allocator<_Tp>&) [with _ForwardIterator = Student*; _Size = long unsigned int; _Tp = Student]’
/usr/include/c++/7/bits/stl_vector.h:1347:36:   required from ‘void std::vector<_Tp, _Alloc>::_M_default_initialize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = Student; _Alloc = std::allocator<Student>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
/usr/include/c++/7/bits/stl_vector.h:285:30:   required from ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = Student; _Alloc = std::allocator<Student>; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<Student>]’
main.cpp:158:29:   required from here
/usr/include/c++/7/bits/stl_construct.h:75:7: error: no matching function for call to ‘Student::Student()’
     { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:74:1: note: candidate: Student::Student(Student&&)
 Student::Student(Student&& other)
 ^~~~~~~
main.cpp:74:1: note:   candidate expects 1 argument, 0 provided
main.cpp:55:1: note: candidate: Student::Student(const Student&)
 Student::Student(const Student& other)
 ^~~~~~~
main.cpp:55:1: note:   candidate expects 1 argument, 0 provided
main.cpp:45:1: note: candidate: Student::Student(std::__cxx11::string, int, int, int)
 Student::Student(string name,int matr_num,int test_1,int test_2)
 ^~~~~~~
main.cpp:45:1: note:   candidate expects 4 arguments, 0 provided
Course::Course(string titel)
: titel{titel}
, stud_list{0}{} <--- in here