Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One bug in QYKShortestPaths.cpp #3

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment
Open

One bug in QYKShortestPaths.cpp #3

GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Using Borland C++ Builder 6 to compile this project.
2. There are a error in QYKShortestPaths.cpp during compiling the project.
3. The bug is in "void CQYKShortestPaths::_SearchTopKShortestPaths()" and 
line 127 :
// Call _Restore4CostAjustment again for the deviated_node
_RestoreEdges4CostAjustment(node_list_in_path, deviated_node_id, 
node_list_in_path.at(i+1), true);
4. The error message tells me that "Undefined symbol "i" on line 127.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
I use k-shortest-paths-1.0.2
My operating system is Windows XP SP2

Please provide any additional information below.
Please tell me how tow modify this error.

Original issue reported on code.google.com by [email protected] on 21 Apr 2008 at 5:30

@GoogleCodeExporter
Copy link
Author

This is an inconsistency between different compilers. I programmed with VC++, 
and the
compiler used by Microsoft in VS6.0 doesn't exactly follow the standard cpp 
syntax. 
So you could make a little bit change on the code from:
for (int i=path_length-2; i>=0 && node_list_in_path.at(i) != deviated_node_id; 
--i)    {
_RestoreEdges4CostAjustment(node_list_in_path, node_list_in_path.at(i),
node_list_in_path.at(i+1));
}

to:
int i = 0;
for (i=path_length-2; i>=0 && node_list_in_path.at(i) != deviated_node_id; --i)
{
_RestoreEdges4CostAjustment(node_list_in_path, node_list_in_path.at(i),
node_list_in_path.at(i+1));
}

Original comment by [email protected] on 25 May 2008 at 6:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant