I have create this squareList class I when I compile it it give me to many errors I don't know can someone help me to resolve those error update: I comment all my code after ~square_list(){} and every error pinpoint to list data;
///#include "LinkedList.hpp"
#include <vector>
#include <cassert>
#include <iostream>
#include <iomanip>
#include <math.h>
#include <list>
#include <iterator>
template <typename T_>
class square_list
{
typedef T_ value_type;
typedef std::size_t size_type;
typedef T_ & reference;
typedef T_ const & const_reference;
typedef T_ * pointer;
typedef T_ const * const_pointer;
typedef T_ * iterator;
typedef T_ const * const_iterator;
typedef std::ptrdiff_t difference_type;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
//for header vector<pair<itr,unsindINT) header
list<T_> data;
square_list() {}
~square_list(){}
// bool empty(){
// if(this->begin() == nullptr && this->end() == nullptr)
// return 1;
// else
// return 0;
//}
//list<value_type>::iterator begin() {
// return data.begin();
//}
//list<value_type>::iterator end() {
// return data.end();
//}
};
Error 1 error C2143: syntax error : missing ';' before '<'
Error 4 error C2143: syntax error : missing ';' before '<'
Error 7 error C2143: syntax error : missing ';' before '<'
Error 10 error C2143: syntax error : missing ';' before '<'
Error 13 error C2143: syntax error : missing ';' before '<'
Error 16 error C2143: syntax error : missing ';' before '<'
Error 19 error C2143: syntax error : missing ';' before '<'
Error 22 error C2143: syntax error : missing ';' before '<'
Error 25 error C2143: syntax error : missing ';' before '<'
Error 28 error C2143: syntax error : missing ';' before '<'
Error 31 error C2143: syntax error : missing ';' before '<'
Error 34 error C2143: syntax error : missing ';' before '<'
Error 37 error C2143: syntax error : missing ';' before '<'
Error 40 error C2143: syntax error : missing ';' before '<'
Error 43 error C2143: syntax error : missing ';' before '<'
Error 46 error C2143: syntax error : missing ';' before '<'
Error 3 error C2238: unexpected token(s) preceding ';' Error 6 error C2238: unexpected token(s) preceding ';' Error 9 error C2238: unexpected token(s) preceding ';' Error 12 error C2238: unexpected token(s) preceding ';' Error 15 error C2238: unexpected token(s) preceding ';' Error 18 error C2238: unexpected token(s) preceding ';' Error 21 error C2238: unexpected token(s) preceding ';'
Error 24 error C2238: unexpected token(s) preceding ';'
Error 27 error C2238: unexpected token(s) preceding ';'
Error 30 error C2238: unexpected token(s) preceding ';'
Error 33 error C2238: unexpected token(s) preceding ';'
Error 36 error C2238: unexpected token(s) preceding ';'
Error 39 error C2238: unexpected token(s) preceding ';'
Error 42 error C2238: unexpected token(s) preceding ';'
Error 45 error C2238: unexpected token(s) preceding ';'
Error 48 error C2238: unexpected token(s) preceding ';' Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 8 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 11 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 14 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 17 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 20 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 23 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 26 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 29 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 32 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 35 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 38 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 41 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 44 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Error 47 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
list<T> data
which should belist<T> data
. Other than that I see no other problem. Are you sure this code reproduces the errors shown? – 0x499602D2