hi, i have 2 questions.
does any one know what an hpp file is? why would someone do that ?
i am trying to implement a class that extends vecotr
but i want to use all thee riginal functinos and add on actions for each functin. so i wrote:
#include <iostream>
#include <vector>
#ifndef _MY_PERSONAL_VECTOR
#define _MY_PERSONAL_VECTOR
class PersonalVec: public std::vector<int>{
public:
PersonalVec();
void push_back(const int& Val);
};
#endif
and in the cpp file:
#include <iostream>
#include "PersonalVec.hpp"
using namespace std;
PersonalVec::PersonalVec(): std::vector<int>(){
}
void PersonalVec::push_back(const int& Val):vector<int>::push_back(Val){
cout<<"new improved vector";
}
so in the function push_back i am trieng to call the vector push_back but it is not workink.
any one have any idea? thanks very much :)