super_list

 avatar
Alexmegawin
c_cpp
2 years ago
505 B
4
Indexable
#include <iostream>
using namespace std;

class List
{
private:
	Nod* nod_1;
	int lenght;
public:
	List()
	{
		lenght = 0;
	}
	void create_nod(int num)
	{
		Nod* nod1 = new Nod;
		nod1->num = num;
		nod1->nod_n = nod_1;
		nod_1 = nod1;
		lenght++;
	}
	void delete_nod() 
	{
		delete(nod_1);
		lenght--;
	}
	int lenght()
	{
		cout << "lenght of list = " << lenght;
	}
};

class Nod
{
public:
	int num;
	Nod* nod_n;
	Nod()
	{

	}
};

int main()
{

	return 0;
}
Editor is loading...