Click here to Skip to main content
15,899,935 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple selection in Tree control(Non MFC) Pin
Richard MacCutchan18-Sep-12 4:10
mveRichard MacCutchan18-Sep-12 4:10 
GeneralRe: Multiple selection in Tree control(Non MFC) Pin
Chris Meech18-Sep-12 4:15
Chris Meech18-Sep-12 4:15 
QuestionSingle system instance Pin
Taria16-Sep-12 23:16
Taria16-Sep-12 23:16 
AnswerRe: Single system instance PinPopular
Jochen Arndt16-Sep-12 23:35
professionalJochen Arndt16-Sep-12 23:35 
GeneralRe: Single system instance Pin
Michael Haephrati18-Sep-12 10:48
professionalMichael Haephrati18-Sep-12 10:48 
QuestionHow to recognize a table in a pdf file Pin
LuigiSc216-Sep-12 4:10
LuigiSc216-Sep-12 4:10 
AnswerRe: How to recognize a table in a pdf file Pin
Mohibur Rashid16-Sep-12 4:40
professionalMohibur Rashid16-Sep-12 4:40 
QuestionHint for the network check to be done in c++ Pin
en41115-Sep-12 2:39
en41115-Sep-12 2:39 
I am trying do a coding in c++ and My problem goes something like this. I have a variable of 5 arrays a[5] for storing the 5nodes of a network. The network is randomly formed by the random number generator. I have the time of travel for each paths of the network. All the nodes may not be connected to eachother. The network and the time of travel of each path is as per the user has assigned. Now I have to check the elements of each array and assign the penalty as per the conditions. My main task is to find a network path traveling each node of the network only once such that the node visited is not repeated. Its similar to TSP but the difference is that in TSP has the condition that it is possible to travel from each node to every other node. But for my case the network is pre defined and nodes are not connected to every other nodes in the network.

a) Like if the network stored is 2-2-3-4-5 then I find that a[1]=a[2] so I will have to assign the penalty (type 1 )as the network has a path 2-2 which is not possible as the starting and end of the path is same. At the same time for rest of the paths from node 2 to 3, node 3 to 4, node 4 to 5 I will have to calculate the sum of total time of travel when I finally reach the node 5.

b) Also there is another penalty condition if the path is not a possible path in the network given by user then I will have to assign penaly( type 2) for such kind of condition like if 1-2-4-3-5 is a network to be checked. Here I am supposing that all the paths are possible but the path 4-3 doesn’t exist in the real network provided by the user, So for such cases I will have to calculate the sum of the time of travel for the paths which are possible and also assign the penalty (type 2)

c) There is also a condition that I need the end point of the network as node 5.So in the network generated randomly if the end node is not the node 5 then I will have to assign the penalty (type 3) and at the same time calculated the sum of the rest possible paths. For example the node 3-5-2-1-4 here the end node is 4 so I will have to assign the penalty(type 4)

d) Since I am not allowed to visit the same node twice I will have to assign the (penalty type 4) if the network has repeatition of nodes like if the network is 2-4-3-1-4. Here the node 4 is occurring twice so I will have to assign the penalty(type 4) and also calculate the sum of the time of travel of the other paths.

Considering all the above penalty conditions I will have to check the network s. I am really not being able to use any logic on how do I start. Need some hint on how do I do it.

modified 15-Sep-12 12:53pm.

AnswerRe: Hint for the network chek Pin
Richard MacCutchan15-Sep-12 3:16
mveRichard MacCutchan15-Sep-12 3:16 
QuestionHow can i create a numeric constant from a numeric variable ? Pin
s.n.arruda15-Sep-12 0:57
s.n.arruda15-Sep-12 0:57 
AnswerRe: How can i create a numeric constant from a numeric variable ? Pin
pasztorpisti15-Sep-12 1:08
pasztorpisti15-Sep-12 1:08 
AnswerRe: How can i create a numeric constant from a numeric variable ? Pin
Richard MacCutchan15-Sep-12 2:31
mveRichard MacCutchan15-Sep-12 2:31 
QuestionConversion of image Handle hDib to Char* array in C++ Pin
AhmdAxf14-Sep-12 2:08
AhmdAxf14-Sep-12 2:08 
QuestionRe: Conversion of image Handle hDib to Char* array in C++ Pin
CPallini14-Sep-12 2:25
mveCPallini14-Sep-12 2:25 
AnswerRe: Conversion of image Handle hDib to Char* array in C++ Pin
AhmdAxf14-Sep-12 2:46
AhmdAxf14-Sep-12 2:46 
QuestionRe: Conversion of image Handle hDib to Char* array in C++ Pin
CPallini14-Sep-12 2:58
mveCPallini14-Sep-12 2:58 
AnswerRe: Conversion of image Handle hDib to Char* array in C++ Pin
AhmdAxf14-Sep-12 3:13
AhmdAxf14-Sep-12 3:13 
QuestionRe: Conversion of image Handle hDib to Char* array in C++ Pin
CPallini14-Sep-12 3:16
mveCPallini14-Sep-12 3:16 
AnswerRe: Conversion of image Handle hDib to Char* array in C++ Pin
AhmdAxf14-Sep-12 3:23
AhmdAxf14-Sep-12 3:23 
GeneralRe: Conversion of image Handle hDib to Char* array in C++ Pin
Chris Losinger14-Sep-12 5:56
professionalChris Losinger14-Sep-12 5:56 
GeneralRe: Conversion of image Handle hDib to Char* array in C++ Pin
Richard MacCutchan14-Sep-12 7:37
mveRichard MacCutchan14-Sep-12 7:37 
GeneralRe: Conversion of image Handle hDib to Char* array in C++ Pin
AhmdAxf27-Sep-12 21:23
AhmdAxf27-Sep-12 21:23 
GeneralRe: Conversion of image Handle hDib to Char* array in C++ Pin
Richard MacCutchan27-Sep-12 22:54
mveRichard MacCutchan27-Sep-12 22:54 
GeneralRe: Conversion of image Handle hDib to Char* array in C++ Pin
AhmdAxf28-Sep-12 0:25
AhmdAxf28-Sep-12 0:25 
GeneralRe: Conversion of image Handle hDib to Char* array in C++ Pin
Richard MacCutchan28-Sep-12 1:58
mveRichard MacCutchan28-Sep-12 1:58 

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.