C2664 Compile Error

This is a discussion on C2664 Compile Error within the C++ Programming forums, part of the General Programming Boards category; Hi, I am receiving a C2664 error on my program. This is the first time I have ever received this ...

  1. #1
    Unregistered
    Guest

    Question C2664 Compile Error

    Hi, I am receiving a C2664 error on my program. This is the first time I have ever received this error. It has to do with the array and the way I am initializing it..

    error C2664: 'doSum' : cannot convert parameter 1 from 'int' to 'int []'
    Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
    Error executing cl.exe.
    The error points to this line... float Sum = doSum(Grade);
    That line above is where I am initializing. My function prototype line is ..... float doSum(int Grade[]);

    Can someone tell me why I would be receiving this error?

    Thanks

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    Grade is an int, I am assuming, not an int[].
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Needs help in Dev-C++
    By Korrupt Lawz in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2010, 01:17 AM
  2. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  4. C++ compilation issues
    By Rupan in forum C++ Programming
    Replies: 1
    Last Post: 08-22-2005, 05:45 AM
  5. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 03:49 AM

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