hello i am sorry to ask here but i didnt knew where to so here i go:

can someone here translate this c++ code below to pascal(delphi)


Code:
#include <iostream.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#define MAX_LINKS 100	
#define INFINITY 999999 
#define EXCLUDED 999998	




class cNode
&#123;
	public&#58;
	
	char	name&#91;10&#93;;			
	int		weight&#91;MAX_LINKS&#93;;	

	cNode	*linked&#91;MAX_LINKS&#93;;	
	bool	visited&#91;MAX_LINKS&#93;;	

	void init&#40;&#41;
	&#123;
		for&#40;int i=0;i<MAX_LINKS;i++&#41; &#123; linked&#91;i&#93;=NULL;visited&#91;i&#93;=false;weight&#91;i&#93;=0; &#125;
	&#125;

	void setname&#40;char *text&#41;
	&#123;
		strcpy&#40;name,text&#41;;
	&#125;

&#125;;

int linker=0;
int lenght=0;
int lenghts&#91;MAX_LINKS&#93;,final_lenghts&#91;MAX_LINKS&#93;,parents&#91;MAX_LINKS&#93;;

int gpointer=0;
int start=1,finish=gpointer;
cNode *graph&#91;MAX_LINKS&#93;;		


void pauz&#40;char *text&#41;
&#123;
	cout << "\n" << text << "\n";
	char por;
	cin >> por;
&#125;

void draw_graph&#40;&#41;
&#123;
	cout << "\n************* Drawing graph ********************\n";
	for&#40;int X=1;X<=gpointer;X++&#41;
	&#123;
		for&#40;int Y=0;Y<MAX_LINKS;Y++&#41;
		&#123;
			if&#40;graph&#91;X&#93;->linked&#91;Y&#93;&#41;
			&#123;
				cout << "\n" << graph&#91;X&#93;->name << " -> " << graph&#91;X&#93;->linked&#91;Y&#93;->name << " &#58;&#58; weight=" << graph&#91;X&#93;->weight&#91;Y&#93;;
			&#125;
		&#125;
	&#125;
	
	cout << "\n************************************************\n";
&#125;

bool sysedi&#40;cNode *from,cNode *target&#41;
&#123;
	for&#40;int i=0;i<MAX_LINKS;i++&#41;
	&#123;
		if&#40; &#40;from->linked&#91;i&#93;&#41; && &#40;strcmp&#40;from->linked&#91;i&#93;->name,target->name&#41;==0&#41; &#41; 
		&#123; 
			linker=i;
			return true;
		&#125;
	&#125;
	
	return false;
&#125;

int find_smallest&#40;int masiv&#91;MAX_LINKS&#93;&#41;
&#123;
	int min = INFINITY, returned=0;


	for&#40;int i=1;i<=gpointer;i++&#41; 
	&#123;
		if&#40;masiv&#91;i&#93;<min&#41; &#123; min=masiv&#91;i&#93;;returned=i;&#125;
	&#125;

	/*- vry6ta NE stoinostta a koe q sydyrja tazi stoinost -*/
	return returned;
&#125;

void update_lenghts&#40;int vryh&#41;
&#123;
	for&#40;int i=1;i<=gpointer;i++&#41;
	&#123;
		if&#40;&#40;lenghts&#91;i&#93;>lenghts&#91;vryh&#93;&#41;&&&#40;graph&#91;i&#93;!=graph&#91;vryh&#93;&#41;&#41;
		&#123;
			if&#40; &#40;lenghts&#91;i&#93;!=EXCLUDED&#41; && &#40;sysedi&#40;graph&#91;vryh&#93;,graph&#91;i&#93;&#41;&#41; && &#40; graph&#91;vryh&#93;->weight&#91;linker&#93; + lenghts&#91;vryh&#93; < lenghts&#91;i&#93;&#41; &#41; 
			&#123; 
				lenghts&#91;i&#93; = &#40;graph&#91;vryh&#93;->weight&#91;linker&#93;&#41; + &#40;lenghts&#91;vryh&#93;&#41;; 
				parents&#91;i&#93; = vryh;
			&#125;
		&#125;
	&#125;

	final_lenghts&#91;vryh&#93;=lenghts&#91;vryh&#93;;
	lenghts&#91;vryh&#93;=EXCLUDED;
&#125;


bool ima_non_infinit&#40;&#41;
&#123;
	for&#40;int i=1;i<=gpointer;i++&#41;
	&#123;
		if&#40;lenghts&#91;i&#93;<EXCLUDED&#41; return true;
	&#125;

	return false;
&#125;

void showpath&#40;int to&#41; 
&#123;
	if&#40;lenghts&#91;to&#93;==INFINITY&#41; &#123; cout << "\nNo path!\n";return; &#125;
	cout << graph&#91;to&#93;->name << " <- ";
	if&#40;parents&#91;start&#93;==parents&#91;to&#93;&#41; &#123; cout << graph&#91;start&#93;->name; return; &#125;
	showpath&#40;parents&#91;to&#93;&#41;;
	return;
&#125;


void perform&#40;&#41;
&#123;

	for&#40;int k=1;k<=gpointer;k++&#41;
	&#123;
		if&#40;graph&#91;k&#93;==graph&#91;start&#93;&#41; &#123; lenghts&#91;k&#93;=EXCLUDED; &#125;	else
		if&#40;sysedi&#40;graph&#91;start&#93;,graph&#91;k&#93;&#41;&#41; &#123; lenghts&#91;k&#93;=graph&#91;start&#93;->weight&#91;linker&#93;; &#125; else
		&#123; lenghts&#91;k&#93;=INFINITY; &#125;
		parents&#91;k&#93;=start;
	&#125;

	while&#40;ima_non_infinit&#40;&#41;&#41; &#123; update_lenghts&#40;find_smallest&#40;lenghts&#41;&#41;; &#125;
	update_lenghts&#40;find_smallest&#40;lenghts&#41;&#41;;
&#125;

bool seek_path&#40;&#41;
&#123;
	cout << "\n************** Seeking path ********************\n";
	cout << "Where we start from &#40;1.." << gpointer << "&#41; &#91;0=Exit&#93;&#58; "; cin >> start;
	
	if&#40;start!=0&#41;
	&#123;
		perform&#40;&#41;;
		cout << "Seek path to        &#40;1.." << gpointer << "&#41;         &#58; "; cin >> finish;
		showpath&#40;finish&#41;;
		cout << "\nLenght&#58; ";
		if&#40;lenghts&#91;finish&#93;==INFINITY&#41; &#123; cout << "INFINITY"; &#125; else
		if&#40;final_lenghts&#91;finish&#93;==EXCLUDED&#41; &#123; cout << "0";        &#125; else
		&#123; cout << final_lenghts&#91;finish&#93;; &#125;
		cout << "\n************************************************\n";
		return true;
	&#125; 
	else
	&#123;
		if&#40;start==0&#41; &#123; cout << "\n************************************************\n";return false;&#125;
	&#125;

&#125;

int main&#40;&#41;
&#123;	
	for&#40;int i=0;i<MAX_LINKS;i++&#41; &#123; graph&#91;i&#93;=NULL; &#125;
	
	int number=1;	//broi vyzli v grafa
	int X=1,Y=0;	//rabotni broq4i
	int weight=0;
	
	cout << "Number of nodes in the Graph&#58; "; cin >> gpointer;
	
	for&#40;int x=1;x<=gpointer;x++&#41;	
	&#123;
		char temp&#91;10&#93;;
		graph&#91;x&#93; = new cNode;
		graph&#91;x&#93;->init&#40;&#41;;
		graph&#91;x&#93;->setname&#40;itoa&#40;x,temp,10&#41;&#41;;
	&#125;

	for&#40;X=1;X<=gpointer;X++&#41;		
	&#123;
		cout << "\n";

		while&#40;number!=0&#41;
		&#123;
			cout << " node " << X << " is linked with &#40;'0' exits&#41;&#58; "; cin >> number;
			if&#40;number==0&#41; break;
			graph&#91;X&#93;->linked&#91;Y&#93;=graph&#91;number&#93;;

			cout << " Weight between " << X << " and " << number << " = "; cin >> weight;cout << "\n";
			graph&#91;X&#93;->weight&#91;Y&#93;=weight;
			
			Y++;
		&#125;

		number=1;Y=0;weight=0;
	&#125;
	draw_graph&#40;&#41;;

	while&#40;seek_path&#40;&#41;&#41;;

    system&#40;"pause"&#41;;

	
	return 0;
&#125;