#include <iostream>
using namespace std;
#include "basicperson.h"
#include "aperson.h"
#include <string>
#include <fstream>

void aperson:: init_data(char in_name[], int in_number,
						  char in_title[] )
{
	strcpy_s( name, in_name);
	number = in_number;
	strcpy_s( title, in_title);
}
void aperson:: display()
{
	cout << " A_Person : "<< name << " 's number is "<< number
		<<" and is the "<< title <<" "<< name << endl;
}
void aperson:: print_list()
{
	ofstream xout("Print_list.cpp",ios::app);
	xout << " A_Person : "<< name << " 's number is "<< number
		<<" and is the "<< title <<" "<< name << endl;
	xout.close();
	
	//ifstream xin("Print_list.cpp");
	//cout << " here is the contents of the file :\n";
	//char ch;
	//while(xin.get(ch))
		//cout << ch;
	//cout << " ******* End of file contents *******\n";
	//xin.close();
}

void aperson:: erase_print_list()
{
	if(NbOfPrints!=0)
	{
	ofstream xout("Print_list.cpp");
	xout <<" " << endl;
		
	xout.close();
	}
	else cout << " There is no list to erase !\n";
}

int basicperson::NbOfPrints = 0;

void animal:: init_data_animal(char in_name[], int in_number,
						  char in_title[], char in_comments[25] )
{
	strcpy_s( name, in_name);
	number = in_number;
	strcpy_s( title, in_title);
	strcpy_s( comments, in_comments);
}
void animal:: display()
{
	cout << " Animal : "<< name << " 's number is "<< number
		<<" and is the "<< title <<" "<< name << endl;
	cout <<" Comments : "<< comments << endl;
}
void animal:: print_list()
{ 
	if(NbOfPrints==0) cout << " what!? \n";
	if(NbOfPrints!=0) cout << " Gloup! \n";
	ofstream xout("Print_list.cpp",ios::app);
	xout << " Animal : "<< name << " 's number is "<< number
		<<" and is the "<< title <<" "<< name << endl;
	xout <<" Comments : "<< comments << endl;
	xout.close();
	
	//ifstream xin("Print_list.cpp");
	//cout << " here is the contents of the file :\n";
	//char ch;
	//while(xin.get(ch))
		//cout << ch;
	//cout << " ******* End of file contents *******\n";
	//xin.close();

	NbOfPrints++;
}
void animal:: erase_print_list()
{
	if(NbOfPrints!=0)
	{
	ofstream xout("Print_list.cpp");
	xout <<" " << endl;
		
	xout.close();
	}
	else cout << " There is no list to erase !\n";
}

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