Thread: i dont understand this question i got.

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    2

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

  2. #2
    Registered User
    Join Date
    Sep 2009
    Posts
    63
    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.

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    2
    im not asking for the code but what im asking is what is it asking for

  4. #4
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Quote Originally Posted by cfrye1990 View Post
    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"

  5. #5
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM