G ++ 4.9 ошибка в разрешении std :: ecector C++

Программы на C++. Форум разработчиков
Anonymous
G ++ 4.9 ошибка в разрешении std :: ecector

Сообщение Anonymous »

Рассмотрим следующий код: < /p>

Код: Выделить всё

#include 
#include 
#include 

using namespace std;

typedef double (C_array)[10];

int main()
{
std::vector arr(10);

// let's initialize it
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
arr[i][j] = -1;

// now make sure we did the right thing
for (int i = 0; i < 10; i++)
{
for (int j = 0; j < 10; j++)
{
cout 

Подробнее здесь: [url]https://stackoverflow.com/questions/25109064/g4-9-bug-in-allowing-stdvectorc-type-array[/url]

Вернуться в «C++»