Advertisement

01.11.2008 at 06:22PM PST, ID: 23077430
[x]
Attachment Details

double array inside function

Asked by rabroersma in C Programming Language, Math & Science Questions

Tags: error: invalid use of array with unspecified bounds

When I use compile this I get the error message:

error: invalid use of array with unspecified bounds


for each line in the void fucntion, referring to the lines, i get this duplicate error message

        tester[1][1]=1;
        tester[1][2]=2;
        tester[2][1]=3;
        tester[2][2]=4;


Here is the sample code:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

void junk( int tester[ ][ ]  );

main()
{
        int tester[2][2];
        junk(tester);


}
void junk( int tester[ ][ ]  )
{
        tester[1][1]=1;
        tester[1][2]=2;
        tester[2][1]=3;
        tester[2][2]=4;
}Start Free Trial
 
Loading Advertisement...
 
[+][-]01.11.2008 at 06:33PM PST, ID: 20642400

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: C Programming Language, Math & Science Questions
Tags: error: invalid use of array with unspecified bounds
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]01.11.2008 at 06:39PM PST, ID: 20642422

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.11.2008 at 06:40PM PST, ID: 20642425

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628