명시
Hi,
I need this code to be mod with added function of for MT5:
- delete a node with a key (array size should be reduced by 1), return bool
- check if a node exits with a key, return bool
- update a node with a key, return bool
Note:
I need key to be string
Date is double
array size is dynamic
I want to pay only $30. You need give me the code, upon fully tested, I will release the payment to you. Also provide examples of using it
Basic code can be found here:
string DictGet(string &theArray[][],double key,int sze) { key = NormalizeDouble(key,myDigits()); for (int x = 0; x< (sze/2);x++) { if (theArray[x][0] == string(key)) //key exists return(theArray[x][1]); } return("!"); //key not found } void DictAdd(string &theArray[][],double key,string info,int sze) { key = NormalizeDouble(key,myDigits()); if (sze >0) { for (int x = 0; x< (sze/2);x++) { if (theArray[x][0] == string(key)) // key exits so add to string and return out { theArray[x][1] += " , "+info; return; } } } if (theArray[0][0] == "nil") //first key and val to add to dictionary { theArray[0][0] = string(key); theArray[0][1] = info; return; } else //new key, re-size array and add in key and val { ArrayResize(theArray,(sze/2)+1,0); theArray[(sze/2)][0] = string(key); //as it is a 2 dimensional array the correct index is half the size. should be half size + 1 but cuz indexing starts at 0 it is just half. theArray[(sze/2)][1] = info; } }
응답함
1
등급
프로젝트
16
25%
중재
0
기한 초과
1
6%
무료
2
등급
프로젝트
390
69%
중재
3
100%
/
0%
기한 초과
2
1%
로드됨
프로젝트 정보
예산
30+ USD
개발자에게
27
USD
기한
에서 1 로 2 일