Boost logo

Boost Users :

From: GQ Chen (gqchen1_at_[hidden])
Date: 2007-07-20 20:36:42


Hi,

    I have some troubles in compiling the following simple code,
tboost.hpp, tboost.cpp
The problem is always from the declaration of
  array_type A(boost::extents[2000000][1]);

 in the header file.

Error message from compiling,

In file included from tboost.cpp:2:
tboost.h:14: error: `extents' has not been declared
boost.h:14: error: ISO C++ forbids declaration of `parameter' with no type

 If I define
  array_type A(boost::extents[2000000][1]);
in the source code tboost.cpp, it will compile successfully.

  Could anyone help me to solve it? Thanks a lot,

                                     gq

tboost.hpp

#include <cassert>
#include <stdio.h>
#include <iostream>
#include "boost/multi_array.hpp"

typedef boost::multi_array<double, 2> array_type;

class tboost
{
 public:
  tboost(){};
  ~tboost(){};
   public:
    array_type A(boost::extents[2000000][1]);
};

#endif

tboost.cpp

#include "tboost.h"
int main () {
   char c =getchar();
   return 0;
}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net