"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; Hello I just wrote this very simple program but i got the error "error C2064: term does not evaluate to ...

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    4

    "error C2064: term does not evaluate to a function taking 1 arguments"

    Hello
    I just wrote this very simple program but i got the error "error C2064: term does not evaluate to a function taking 1 arguments", what in my program is wrong?
    here it is:

    Code:
     
    //**********************************************************************
    #include<stdio.h>
    #include<conio.h>
    int main()
    {
    int i;
    double x[19],tn;
    for(i=0;i<19;i++)
    {
    x(i)=1;
    //tn=x(i);
    }
    return 0;
    }

    and here is the error (when i double click on the error given below pointer goes to line 10,x(i)=1; )


    ------ Build started: Project: yj, Configuration: Debug Win32 ------
    Compiling...
    3.cpp
    f:\my project\yj\yj\3.cpp(9) : error C2064: term does not evaluate to a function taking 1 arguments
    Build log was saved at "file://f:\my project\yj\yj\Debug\BuildLog.htm"
    yj - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========




    thanks in advance
    Last edited by gholamghar; 03-31-2010 at 04:19 AM.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,744
    x(i) should be x[i].

    By the way, is this supposed to be C or C++?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Mar 2010
    Posts
    4
    It is c++.I use microsoft visual studio 2008.

  4. #4
    Registered User
    Join Date
    Mar 2010
    Posts
    4

    Problem solved

    Thank you,you are right,i am working with fortran and c++ together right now,and it was my fault that confused the way an array is written in fortran and in c++.thank you very much for you very quick response.
    Last edited by gholamghar; 03-31-2010 at 04:42 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-13-2011, 08:28 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  4. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 08:10 AM
  5. C++ compilation issues
    By Rupan in forum C++ Programming
    Replies: 1
    Last Post: 08-22-2005, 05:45 AM

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