Dijkstra'a algorithm

Status
Not open for further replies.

pdp1231

Newbie level 3
Joined
Jan 9, 2013
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,307
Hi all,

I am new to digital design and in my class we have been assigned with a project to design an accelerator for Dijkstra's algorithm. As a first step we have to make any high level language program for the algorithm. I am trying to write one in C but am stuck with declaration of structures. Please have a look at my code and help me resolve the errors.



The error that I am getting is with the initialization of struct node_info.
trial1.c:57: error: conflicting types for ânodeâ

Please help me fix this code.

Thanks in advance.
 

I too have tried using 'unsigned' variable types in an effort to save memory. I soon decided not to trust it. The reason, is that I was prone to forget they were unsigned, when I introduced them into calculations with signed integers. I forget if there were error messages or what. But things happened that made it seem unreliable to go with unsigned variables.

Anyway I decided that if a single-byte variable turned out having a higher value than +127, then I was better off upgrading it to a 2-byte integer variable, signed.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…