i dont understand this question i got.

This is a discussion on i dont understand this question i got. within the C++ Programming forums, part of the General Programming Boards category; Write a function called Dot that takes two pointers to Point structs called a and b as arguments and computes ...

  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,292
    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
    1,592
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

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, 12:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21