Click here to Skip to main content
15,909,051 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hooking Pin
CPallini26-Jan-08 2:07
mveCPallini26-Jan-08 2:07 
GeneralRe: Hooking Pin
Nitheesh George27-Jan-08 19:14
Nitheesh George27-Jan-08 19:14 
GeneralRe: Hooking Pin
CPallini27-Jan-08 22:22
mveCPallini27-Jan-08 22:22 
GeneralRe: Hooking Pin
Nitheesh George28-Jan-08 16:21
Nitheesh George28-Jan-08 16:21 
Questionhow to assign an array value to another Pin
gentleguy25-Jan-08 22:55
gentleguy25-Jan-08 22:55 
AnswerRe: how to assign an array value to another [modified] Pin
CPallini25-Jan-08 23:30
mveCPallini25-Jan-08 23:30 
GeneralRe: how to assign an array value to another Pin
gentleguy26-Jan-08 0:18
gentleguy26-Jan-08 0:18 
GeneralRe: how to assign an array value to another Pin
CPallini26-Jan-08 1:59
mveCPallini26-Jan-08 1:59 
li zhiyuan wrote:
fitness[10] has 10 elements..when i get minimum of fitness[10], then i should know which position of fitness, for example:fitness[6] or fitness[8]..and so on....


Then you have to update also an index when you update the minimum, for instance
int minIndex; // index of the minimum element
minIndex = 9;
double minValue = fitness[minIndex];
for (int i =0;i<10;i++)
{
  if (fitness[i] < minValue)
  {
    minIndex = i; // update index
    minValue = fitness[minIndex]; // update value
  } 
}


at the end, you know, for instance that minimum value (that correnspond to minValue) is in fitness[minIndex].

li zhiyuan wrote:
and then i will assign corresponding a[i][3][4] to gbest[i][3][4]...because i finally use gbest[i][3][4]....if the fitness[6] is the minimum value of fitness[10]..then i assign a[6][3][4] to gbest[6][3][4]...


Sorry I don't understand the above.

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

[my articles]


GeneralRe: how to assign an array value to another Pin
gentleguy26-Jan-08 2:17
gentleguy26-Jan-08 2:17 
QuestionRe: how to assign an array value to another Pin
CPallini26-Jan-08 2:26
mveCPallini26-Jan-08 2:26 
GeneralRe: how to assign an array value to another Pin
gentleguy26-Jan-08 2:29
gentleguy26-Jan-08 2:29 
GeneralRe: how to assign an array value to another Pin
CPallini26-Jan-08 2:58
mveCPallini26-Jan-08 2:58 
GeneralRe: how to assign an array value to another Pin
gentleguy27-Jan-08 1:32
gentleguy27-Jan-08 1:32 
QuestionRe: how to assign an array value to another Pin
CPallini27-Jan-08 2:49
mveCPallini27-Jan-08 2:49 
GeneralChange Folder path Pin
Paulraj G25-Jan-08 20:54
Paulraj G25-Jan-08 20:54 
GeneralRe: Change Folder path Pin
Maxwell Chen25-Jan-08 21:52
Maxwell Chen25-Jan-08 21:52 
GeneralRe: Change Folder path Pin
David Crow26-Jan-08 12:04
David Crow26-Jan-08 12:04 
AnswerRe: Change Folder path Pin
Alain Rist26-Jan-08 20:17
Alain Rist26-Jan-08 20:17 
QuestionHow to login a website?post!method Pin
chinakknd25-Jan-08 20:51
chinakknd25-Jan-08 20:51 
AnswerRe: How to login a website?post!method Pin
Paul Conrad26-Jan-08 7:50
professionalPaul Conrad26-Jan-08 7:50 
QuestionAny Method to check if database provider is installed on a machine Pin
Mushtaque Nizamani25-Jan-08 20:46
Mushtaque Nizamani25-Jan-08 20:46 
QuestionRe: Any Method to check if database provider is installed on a machine Pin
CPallini26-Jan-08 0:12
mveCPallini26-Jan-08 0:12 
QuestionRe: Any Method to check if database provider is installed on a machine Pin
David Crow26-Jan-08 12:07
David Crow26-Jan-08 12:07 
GeneralAfter Selecting Activex Control the Application crashes... Pin
spalanivel25-Jan-08 18:49
spalanivel25-Jan-08 18:49 
Generalini file creation in windows mobile Pin
guru moorthy.k25-Jan-08 18:48
guru moorthy.k25-Jan-08 18:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.