namespace CS3358_FA2022_A04_sequenceOfNum { template class sequence { public: // TYPEDEFS and MEMBER SP2020 typedef Item value_type; typedef std::size_t size_type; static const size_type CAPACITY = 10; // CONSTRUCTOR sequence(); // MODIFICATION MEMBER FUNCTIONS void start(); void end(); void advance(); void move_back(); void add(const value_type& entry); void remove_current(); // CONSTANT MEMBER FUNCTIONS size_type size() const; bool is_item() const; value_type current() const; private: value_type data[CAPACITY]; size_type used; size_type current_index; bool is_item(); }; } error: invalid use of template-name 'CS3358_FA2022_A04_sequenceOfNum::sequence' without an argument list 120 | sequence::size_type sequence::size() const { | ^~~~~~~~
namespace CS3358_FA2022_A04_sequenceOfNum
{
template <class Item>
class sequence
{
public:
// TYPEDEFS and MEMBER SP2020
typedef Item value_type;
typedef std::size_t size_type;
static const size_type CAPACITY = 10;
// CONSTRUCTOR
sequence();
// MODIFICATION MEMBER FUNCTIONS
void start();
void end();
void advance();
void move_back();
void add(const value_type& entry);
void remove_current();
// CONSTANT MEMBER FUNCTIONS
size_type size() const;
bool is_item() const;
value_type current() const;
private:
value_type data[CAPACITY];
size_type used;
size_type current_index;
bool is_item();
};
}
error: invalid use of template-name 'CS3358_FA2022_A04_sequenceOfNum::sequence' without an argument list
120 | sequence::size_type sequence<Item>::size() const {
| ^~~~~~~~
Step by step
Solved in 3 steps with 10 images