Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

extern 2d array

Original Message
Name: Pashka
Date: February 14, 2008 at 13:09:40 Pacific
Subject: extern 2d array
OS: windows XP
CPU/Ram: AMD 64
Model/Manufacturer: AMD
Comment:
May be it`s a stupid question, but how can I use extern on 2d arrays?
When I declare in header
extern int array[][]

and then define in cpp file
int array[ROW_SIZE][COLUMN_SIZE]

it give me an error:
Error 1 error C2087: 'array' : missing subscript
Error 10 error C2087: 'array' : missing subscript
Error 21 error C2087: 'array' : missing subscript
Error 28 error C2369: 'array' : redefinition; different subscripts

Please help


Report Offensive Message For Removal


Response Number 1
Name: Razor2.3
Date: February 15, 2008 at 06:03:07 Pacific
Subject: extern 2d array
Reply: (edit)
Have you tried
extern int array[ROW_SIZE][COLUMN_SIZE]


Report Offensive Follow Up For Removal

Response Number 2
Name: Pashka
Date: February 17, 2008 at 07:31:48 Pacific
Subject: extern 2d array
Reply: (edit)
Yes, it didn`t work...

Report Offensive Follow Up For Removal

Response Number 3
Name: klint
Date: February 18, 2008 at 09:49:24 Pacific
Subject: extern 2d array
Reply: (edit)
I don't see anything wrong with Razor's suggestion. It should work. Of course, you need to have the constants ROW_SIZE and COLUMN_SIZE defined at the point where you have your declaration. Could that be the problem?

Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: extern 2d array

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




CPU and Graphics Upgrade Questions

VIRUS ALERT in Taskbar, HELP!

DSHUB24 Connection Problems

need help with dsl and dial up

novel 3.12


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC