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);

Printable View

- 09-26-2009cfrye1990i dont understand this question i got.
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); - 09-26-2009Zach_the_Lizard
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.

- 09-26-2009cfrye1990
im not asking for the code but what im asking is what is it asking for

- 09-26-2009iMalc
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. - 09-26-2009Yarin