Thread: Error C2064 term does not evaluate to a function taking 1 arguments

  1. #1
    Registered User
    Join Date
    Jun 2010

    Error C2064 term does not evaluate to a function taking 1 arguments

    Please look at this .. I am having error in the
    model.add(cost[i] == costMatrix[i](supplier[i]));
    model.add(open(supplier[i])==1 );

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    > costMatrix[i](supplier[i])

    The ( ) is the function call.

    It thinks costMatrix[i] should be a function (and it isn't).

    Did you mean to perform some calculation, say
    costMatrix[i] * (supplier[i])
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 10-20-2008, 10:23 AM
  2. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  3. recursion error
    By cchallenged in forum C Programming
    Replies: 2
    Last Post: 12-18-2006, 09:15 AM
  4. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  5. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM