I was reading a C++ code line. I encountered a weird code line where a variable was used as a function with a 0 as its parameter!
template <class T> class Stack {
    T data[50];
    int nElements;
public:
//This line is where the variable was used like a function!
    Stack() : nElements(0){}
    void push(T elemen);
    T pop();
    int tamanho();
    int isEmpty();
};
So what does exactly mean when we have: the constructor : private variable (0){}
This code line was very weird for me! Thanks
 
     
     
     
    