Thread: entry level homework help: Passing Arrays into functions.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    Code:
    void DisplayResults(int, int, const int);
    //...
    void DisplayResults(int FirstArray[], int SecondArray[], const int SIZE)
    Try changing your prototype to match how you actually implement it, as the compiler still "thinks" the function only accepts 3 separate integer parameters.

  2. #2
    Registered User
    Join Date
    Apr 2010
    Posts
    37
    Awesome, thanks man. Never noticed that through all of my notes and all of my examples : / Thanks again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 07-03-2008, 11:31 AM
  2. Replies: 12
    Last Post: 06-06-2008, 05:26 PM
  3. Arrays out-of-bounds in functions only?
    By KneeLess in forum C Programming
    Replies: 5
    Last Post: 11-03-2004, 06:46 PM
  4. Replies: 6
    Last Post: 05-06-2003, 03:08 PM
  5. passing arrays through functions
    By Ecko in forum C++ Programming
    Replies: 4
    Last Post: 04-08-2003, 08:21 PM