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

This is a discussion on Error C2064 term does not evaluate to a function taking 1 arguments within the C++ Programming forums, part of the General Programming Boards category; Please look at this .. I am having error in the model.add(cost[i] == costMatrix[i](supplier[i])); model.add(open(supplier[i])==1 );...

  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    2

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

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,334
    > 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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 08: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, 07:55 AM

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