#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

typedef vector<double>Vect;
typedef vector<Vect>Matr;

int fact(int a);

int main()
{
	
	int i;
	int counter = 0;
	int nb = 0;
	cout << " number of rows or columns :\n";
	cin >> nb;
	
	cout << " Enter the square matrix :\n";
	Vect row(nb);
	Vect determinant;
	Matr a;
	int product = 1;
	int determ = 0;
	int ve1 = 0;

	for(i = 0; i < nb; i++)
	{
		for(int j = 0; j < nb; j++)
		{
			if(j<(nb-1))
				cout << " enter element\n";
			else cout << " enter last element of this row\n";
			cin >> row[j];
		}
		a.push_back(row);
	}
	
	for(i = 0; i < nb; i++)
	{
		cout << endl;
		for(int j = 0; j < nb; j++)
		{
			cout << a[i][j] << " ";
		}
	}
	cout << endl;



	vector<int>vec;
	for(i = 1; i <= nb; i++)
		vec.push_back(i);
	vector<int>::iterator iter1 = vec.begin();
	vector<int>::iterator iter2 = vec.end();


	for(i = 0; i < fact(nb); i++)
	{
		 /* copy(vec.begin(), vec.end(), ostream_iterator<int>(cout, " "));;*/
		  vector<int>vec1(nb);
		  copy(vec.begin(), vec.end(), vec1.begin());
		  for(int j = 0; j < (nb); j++)
			  cout << vec1[j];
		  for(int i = 0; i < vec1.size(); i++)
		  {
			
			  for(int j = i; j < vec1.size(); j++)
			  {
				  if(vec1[j]<vec1[i])
					  counter++;
			  }
		  }
		  if(counter%2==0)
			  cout << " even ";
		  else 
			  cout << " odd ";
		  
		  
		  for(int w = 0; w < nb; w++)
		  {
			  ve1 = (vec1[w])-1;
			  product *= (a[w][ve1]);
		  }	
		  if(counter%2!=0)
			  product = (- product);

		  determinant.push_back(product); 

          counter = 0;
		  product = 1;
		  next_permutation(iter1, iter2);
		  cout << endl;
	}
	
	for(int x = 0; x < determinant.size(); x++)
	{
		determ += determinant[x];
	}
	
	for(i = 0; i < nb; i++)//print the matrix
	{
		cout << endl;
		for(int j = 0; j < nb; j++)
		{
			cout << a[i][j] << " ";
		}
	}
	cout << endl;


	cout << " The determinant is :\n";
	cout << determ << endl;


  
    return 0;
}

int fact(int a)
{
	if(a<=1)
		return a;

	return (a * fact(a - 1));
}

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