Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) StdTr1ArrayExample1

 

Technical facts

 

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: ./CppStdTr1ArrayExample1/CppStdTr1ArrayExample1.pro

 

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp

#QMAKE_CXXFLAGS += -std=c++11

 

 

 

 

 

./CppStdTr1ArrayExample1/main.cpp

 

#include <tr1/array>
#include <cassert>

int main()
{
  const int sz = 3;
  std::tr1::array<int,sz> v;
  v[0] = 0;
  v[1] = 1;
  v[2] = 2;
  assert(v.size() == sz);
  assert(v[0] == 0);
  assert(v[1] == 1);
  assert(v[2] == 2);
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

This page has been created by the tool CodeToHtml