Wondering if I could get some help. This program is supposed to :
-Input student data(firstname,lastname,student#, and a vector of Grades(up to 10 grades) with a grade and assignment name
First of all I'm not using the right fstream commands or something for output to a text file. Please help. (line 389-402)
Second, when doing a comparison of strings, like "if ( ((*it).getStudentNumber) == ssn)" doesnt work, how do i do this properly?
Lastly, how do i properly delete a student from the vector of students? "delete (*it);" not working. (line 377)
Also, what am i forgetting with my printGrade function for student, it doesnt work, here is my list of errors the compiler throws at me.
Code:
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(147) : error C2784: 'bool std::operator ==(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\string(91) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(147) : error C2784: 'bool std::operator ==(const _Elem *,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const _Elem *' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\string(81) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(147) : error C2784: 'bool std::operator ==(const std::basic_string<_Elem,_Traits,_Alloc> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\string(71) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(147) : error C2784: 'bool std::operator ==(const std::vector<_Ty,_Alloc> &,const std::vector<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::vector<_Ty,_Alloc> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\vector(1259) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(147) : error C2784: 'bool std::operator ==(const std::istream_iterator<_Ty,_Elem,_Traits,_Diff> &,const std::istream_iterator<_Ty,_Elem,_Traits,_Diff> &)' : could not deduce template argument for 'const std::istream_iterator<_Ty,_Elem,_Traits,_Diff> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\iterator(266) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(147) : error C2784: 'bool std::operator ==(const std::allocator<_Ty> &,const std::allocator<_Other> &) throw()' : could not deduce template argument for 'const std::allocator<_Ty> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\xmemory(174) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(147) : error C2784: 'bool std::operator ==(const std::istreambuf_iterator<_Elem,_Traits> &,const std::istreambuf_iterator<_Elem,_Traits> &)' : could not deduce template argument for 'const std::istreambuf_iterator<_Elem,_Traits> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\xutility(2143) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(147) : error C2784: 'bool std::operator ==(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\xutility(1826) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(147) : error C2784: 'bool std::operator ==(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\utility(60) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(147) : error C2677: binary '==' : no global operator found which takes type 'std::string' (or there is no acceptable conversion)
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(245) : error C2784: 'bool std::operator ==(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\string(91) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(245) : error C2784: 'bool std::operator ==(const _Elem *,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const _Elem *' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\string(81) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(245) : error C2784: 'bool std::operator ==(const std::basic_string<_Elem,_Traits,_Alloc> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\string(71) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(245) : error C2784: 'bool std::operator ==(const std::vector<_Ty,_Alloc> &,const std::vector<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::vector<_Ty,_Alloc> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\vector(1259) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(245) : error C2784: 'bool std::operator ==(const std::istream_iterator<_Ty,_Elem,_Traits,_Diff> &,const std::istream_iterator<_Ty,_Elem,_Traits,_Diff> &)' : could not deduce template argument for 'const std::istream_iterator<_Ty,_Elem,_Traits,_Diff> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\iterator(266) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(245) : error C2784: 'bool std::operator ==(const std::allocator<_Ty> &,const std::allocator<_Other> &) throw()' : could not deduce template argument for 'const std::allocator<_Ty> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\xmemory(174) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(245) : error C2784: 'bool std::operator ==(const std::istreambuf_iterator<_Elem,_Traits> &,const std::istreambuf_iterator<_Elem,_Traits> &)' : could not deduce template argument for 'const std::istreambuf_iterator<_Elem,_Traits> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\xutility(2143) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(245) : error C2784: 'bool std::operator ==(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\xutility(1826) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(245) : error C2784: 'bool std::operator ==(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'overloaded-function'
1> c:\program files\microsoft visual studio 8\vc\include\utility(60) : see declaration of 'std::operator =='
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(245) : error C2677: binary '==' : no global operator found which takes type 'std::string' (or there is no acceptable conversion)
1>c:\documents and settings\dev\my documents\c++\p4\main\main\main.cpp(256) : error C2440: 'delete' : cannot convert from 'Student' to 'void *'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>Student.cpp
1>Generating Code...
1>c:\documents and settings\dev\my documents\c++\p4\main\main\student.cpp(61) : warning C4715: 'Student::printGrades' : not all control paths return a value