Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4610164
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:05:33+00:00 2026-05-22T01:05:33+00:00

This is from the Boost docs and compiles without problems. #include boost/multi_array.hpp int main

  • 0

This is from the Boost docs and compiles without problems.

#include "boost/multi_array.hpp"

int main () {
    // Create a 3D array that is 3 x 4 x 2
    typedef boost::multi_array<double,3> array_type;
    typedef array_type::index index;
    array_type A(boost::extents[3][4][2]);
    return 0;
}

My question is: What is the second template parameter? It’s not clear to me from the documentation. This code will only compile if it is set to 3.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:05:34+00:00Added an answer on May 22, 2026 at 1:05 am

    It’s how many dimensions you need.

    boost::extents[3][4][2] // we use 3 dimensions
    

    So if you change this number, you’ll have to change this line to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't figure out why I get this error : /usr/local/include/boost/asio/impl/read.hpp: In member function
This is more or less copy pasted from boost docs and I keep getting
This code: #include <boost/signals.hpp> #include <boost/bind.hpp> #include <boost/mem_fn.hpp> #include <iostream> class Recorder : public
The below is from the official BOOST docs. Why do I always get size
I have a program that uses the mt19937 random number generator from boost::random. I
I have a thread pool that is using shared mutexes from the boost library.
So, I'm trying to use boost.process library. I downloaded package from this location ,
I'm reading from a boost::asio::ip::udp::socket like this: using boost::asio::ip::udp; // ... char recv_buf[128]; udp::endpoint
So I was looking through some boost source code and came across this: (from
I'm trying to do something like this: using namespace boost::lambda; using boost::thread; int add(int

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.