cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Storing entire one array into one cell o
Storing entire one array into one cell of another array
Jul 31, 2013 at 8:31pm UTC
mosahab
(33)
Take for example two arrays.
1
2
int
A[2][2][2] = { {{1, 2}, {3, 4}},{{ 5, 6}, {7, 8}} };
int
B[1]
I want to store the entire array "A" into B[1]. Is it possible?
Last edited on
Jul 31, 2013 at 8:33pm UTC
Jul 31, 2013 at 8:35pm UTC
vlad from moscow
(6539)
It is impossible because array b has only one element while array a has 8 elements.:)
Last edited on
Jul 31, 2013 at 8:36pm UTC
Jul 31, 2013 at 8:50pm UTC
vlad from moscow
(6539)
I am sorry! There is a way to store the whole array A in B[1].
As array A has values in order from 1 to 8 then their sum will be equal to 36. You can store in B[1] this sum.:)
Topic archived. No new replies allowed.