Vote count:
0
Hello I am a novice programmer with a question about these weird functions with void in the () brackets for example DataType DeleteFront(void);
I would like a good explanation from a programmer because i have searched for the answer for a while. I do not know why they are there and what can be used to pass to them.
Here is a list of few examples:
// list modification methods
void Insert(const DataType& item);
void Delete(const DataType& item);
DataType DeleteFront(void);
void ClearList(void); //<<==== Like this one for instance
};
// Class Definition:
// constructor. set size to 0
SeqList::SeqList(void) : size(0)
{}
// return number of elements in list
int SeqList::ListSize(void) const
{
return size;
}
// tests for an empty list
int SeqList::ListEmpty(void) const
{
return size == 0;
}
// clears list by setting size to 0
void SeqList::ClearList(void)
{
size = 0;
}
asked 1 min ago
fuctions with void parameters
Aucun commentaire:
Enregistrer un commentaire