|
-
C++
How do you write a statement that declares a standard array of three *******s, initialized to 1, 2, and 4?
-
int arr[3]={1,2,4};
That's it.
AMD 1.2GHz Athlon 266FSB w/GlobalWin CAK38
Asus A7M266
Kingston PC2100 2x 256MB
IBM 75GXP ATA100 7200RPM 45GB
Creative 12x DVD
Yamaha 4x4x16x CD-RW
Matrox G400 Millenium
Matrox Rainbow Runner TV-Tuner/Capture Card
SB Live! 5.1 Platinum
Creative Dxr3 Decoder Card
3Com 3C905B 10/100 NIC
Mitsubishi 900u
Antec PP403X 400W PSU
In-Win Q500
-
Texan Dragon Moderator
Originally posted by driver:
int arr[3]={1,2,4};
That's it.
Would you stop beating me to answers that I actually know. 
Great havin' you around, driver.
------------------
Dragon of the OC Crusaders
The race is not always to the swift, nor the battle to the strong, but that's the way to bet.
-- Damon Runyon
Dragon of the OC Crusaders
Break the rules and you're snack food for this dragon...
-
Just remember though that when accessing the array the locations starts at zero so arr[0] = 1, arr[1] = 2, and arr[2] = 4
-
Mako Shark
sounds like assignment 
------------------
Keep it brief
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|