Mega Code Archive
List of integers
#include
#include
#include
const int No=5;
class List
{
private:
int n;
int *array;
public:
List(int i)
{
array=new int[i];
n=i;
}
~List()
{
delete array;
}
void Init(int al,...);
void Show();
void Add(List &v1,List &v2);
int Inner(List &v2);
void Scale(int x);
};
void List::Init(int al,...)
{
va_list argp;
va_start(argp,al);
array[0]=al;
for(int i=1;i