@Sylar9
134 / 55 / 2
Регистрация: 04.09.2011
Сообщений: 1,952
|
31.01.2012, 15:41
[ТС]
|
|

Сообщение от go
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| #include <iostream>
#include <algorithm>
#include <iterator>
int main()
{
int a[] = { 1, 2, 3};
int b[] = { 4, 5, 6};
const int SIZE = 3;
int arr[SIZE + SIZE];
std::copy(a, a + SIZE, arr);
std::copy(b, b + SIZE, arr + SIZE);
std::copy(arr, arr + SIZE + SIZE, std::ostream_iterator<int> (std::cout, " "));
std::cout << std::endl;
} |
|
http://liveworkspace.org/code/5bf174d4fdc1ddb8c1c01a1d792764c6
С вектором было бы куда-либо проще 
а так не получаеться:
C++ | 1
2
| for(int i=0;i<3;i++)
p[i]=m[i]+n[i]; |
|
0
|