HI GUYS
I am in big trouble!!
I have so many problems it is hard to know where to begin. Firstly, I will show code:
I have not yet attempted to link this to my library function, just trying to see if this works first...Code:#include <iostream> #include <fstream> #include <string> #include <cassert> #include <iomanip> #include "date.h" using namespace std; int main() { date temp1; temp1.setDay(2); temp1.getDay(); cout << temp1 << endl; }
I am not sure because I am very naive with this but think that it is the way I am trying to compile it.
This method has worked for me in the past.
Is there anything wrong with the actual code?
Here is a brief (compared to the huge running list of error msg) idea of what happens when I compile by
The errors:Code:g++ myProgram.cpp -c
Code:assign5.cpp: In function `int main()': assign5.cpp:19: error: no match for 'operator<<' in 'std::cout << temp1' /usr/include/c++/3.3.2/bits/ostream.tcc:63: error: candidates are: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>&(*)(std::basic_ostream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>] /usr/include/c++/3.3.2/bits/ostream.tcc:85: error: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ios<_CharT, _Traits>&(*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>] /usr/include/c++/3.3.2/bits/ostream.tcc:107: error: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base&(*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>] /usr/include/c++/3.3.2/bits/ostream.tcc:179: error: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char, _Traits = std::char_traits<char>] /usr/include/c++/3.3.2/bits/ostream.tcc:216: error: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char, _Traits = std::char_traits<char>] /usr/include/c++/3.3.2/bits/ostream.tcc:154: error: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char, _Traits = std::char_traits<char>] /usr/include/c++/3.3.2/ostream:178: error: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char, _Traits = std::char_traits<char>] /usr/include/c++/3.3.2/ostream:189: error: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
Any ideas appreciated



LinkBack URL
About LinkBacks


