
Adjacency Matrix & General Questions
My first year courses were all in Java but the courses in second year all
assume C knowledge and as my high school never had any programming course
other then say keyboarding in WordPerfect. I've picked up a copy of The C
Programming Language and have worked through it. (There were a few
exercises I didn't get but I'm buying the solutions.)
I'm re-doing my first year assignments in C for the practise. I wish to
implement Dijkstra's on a adjacency matrix (after that I'll try it with a
adjacency list) and I'm looking for a short, maybe 3 by 3, example on how
this is done as I can't seem to find one on the net.
Perhaps, even a recommendation on a more advanced book containing such an
example?
My main problem is with these structs. Are these like objects in java? All
the exercises in the book treat them like records but could I define a
function in them? Would I access this like a member variable such as
(*p).function()
Oh and one last question. In the book I've seen functions prototypes like
int function(void)
int main()
Should the keyword void be in the prototype for a main method if I don't
intend to use command line arguments?
Thank you for your time. Especially if you read this far down. It's much
appreciated.
--
SharkBoy