.
#include< iostream>
using namespace std;



class Linked_list
{
public:
	Linked_list(): phead(0), ptail(0) {};
	~Linked_list(){}//
	void push_back(const int& a);
    void clear();
	friend 
		ostream& operator<<( ostream& xout, const Linked_list& A)
	{
		node* a = A.phead;
		xout << a->data << endl;
		while(a->pnext)
		{
			a = a->pnext;
			xout << a->data << endl;
		}
		return xout;
	}

private:
	struct node
    {
		int data;
		node* pnext;
	    node(int val, node* p = 0): data(val), pnext(p) {};
	 } *phead, *ptail;

};

void Linked_list::push_back(const int& a)
{
	if(phead == 0)
	{
		node* temp = new node(a,0);
		phead = ptail = temp;
	}
	else
	{
		node* temp = new node(0,0);
		temp = phead;
		while( temp->pnext) temp = temp->pnext;
		node* temp1 = new node(a,0);
		temp->pnext = temp1;
		ptail = temp1;
	}
}

void Linked_list::clear()
{
	while(phead)
	{
		 node* pzap = phead;
		 cout << "\ndelete: "<< pzap->data; 
		 phead = phead->pnext;
		 delete pzap;		
     }
	ptail = 0;
}


int main()
{
	Linked_list A;
	A.push_back(12);
	A.push_back(59);
	A.push_back(01);
	A.push_back(99989);
	cout << A;
	A.clear();

	getchar();
	return 0;
}

Doubly linked list (4 files)

C++ again, for finding one root of a third degree equation and checking the result , it often works fine :

For finding the 93 first Fibonacci numbers very fast , after 93 iterations it is false :

A linked list for practising :

For finding the binary representation of a number using bits :

For finding the binary representation of a number using maths :

hexadecimal representation of a number using maths :

hexadecimal representation of a number using bits :

for well understanding the structure of a linked list, here is a simple one:

It was a long and difficult linked list, but apparently, it works. Below are some other pages of code in C++, exercises most of the time. I have also put some of my plugins for 3dsmax.

I learned maxscript before learning C++, here are some scripts or plugins I did:

Next, there is some linear algebra and funny matrices:

This is now a script for enciphering and deciphering messages.

Here is an example of enciphered message. If I tell you that the 2 primes are 431 and 743 , with my script above you surely can translate the following message: 62520 172480 147764 226702 42110 58127 123996 256203 196716 181614 299597 181614 241357 187604 32762 17311 309478 29630 301116 153664 113777 14703

C++LANGUAGE
 
basicperson.h
aperson.h
aperson.cpp
ofstream.cpp
 
 
 
 
maxplugins
 
thirddegree.cpp
 
fibonacci.cpp
 
linkedlist.cpp
 
binary1
 
binary2
 
BACKHOME
 
hex1
 
hex2
 
simpleLinkedList
 
determinantmatrix
 
QRdecomposition
 
cryptography