Write a function called Dot that takes two pointers to Point structs called a and b as
arguments and computes the dot product (the dot product of two vectors (a,b) and (c,d) is
(a*c) + (b*d);
Write a function called Dot that takes two pointers to Point structs called a and b as
arguments and computes the dot product (the dot product of two vectors (a,b) and (c,d) is
(a*c) + (b*d);
Exactly what part of this question do you not understand? This is not a homework solution forum, so do not expect anyone to do your homework for you. We will generally help with actual questions, but your post contains none.
im not asking for the code but what im asking is what is it asking for
It's asking for a function called Dot that takes two pointers to Point structs called a and b as arguments and computes the dot product.
Again: What part of this don't you understand? Do you know how to declare a function called Dot? Do you know how to declare a struct? Do you know how to declare and use pointers?
By the way, the example shows that your Point structure should have two dimensions, which isn't mentioned in the text.
Just start writing the code and tell us what part of it you are really having a problem with.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"