0
int SeqList<ElemType>::InsertElem(const ElemType &e)//insert at the taild
{
    if(length==maxLength)
        return 0;
    else
    {
        elems[length]=e;
        length++;
        return 1;
    }
}

The purpose of this program is to implement a sequential list,and I want know the difference between return 1 and return 0 and the effect of them. Additionally, why not use void type?

cigien
  • 57,834
  • 11
  • 73
  • 112
lxyzcm
  • 3
  • 2
  • Related/dupe https://stackoverflow.com/questions/52713116/why-do-openssl-crypto-functions-return-1-on-success-0-on-failure – cigien Dec 03 '22 at 10:08

0 Answers0