Blitz logo

Blitz Support :

From: van den Bosch (vandenbosch_at_[hidden])
Date: 2003-07-30 12:00:40


Hello,

I'm trying to cast an Array<double> to Array<int> but it doesn't work. The
(stripped to a minimum) code piece is:

#include <fstream>
#include <blitz/array.h>
#include <blitz/ops.h>

using namespace blitz;

#include "mesh.h"
...
MESH.triangles = cast(triangles_tmp(Range::all(), Range(0, 2)), int());
...

and the error message is:

> gretry.emic.ucl.ac.be:C++/devel> gnumake Zmain_mn
> g++ -c -O3 -I/home/denbosch/blitz++/include create_mesh.cpp
> create_mesh.cpp: In function `int create_mesh(mesh&)':
> create_mesh.cpp:79: no matching function for call to
> `cast(blitz::Array<double, 2>, int)'
> gnumake: *** [create_mesh.o] Error 1
> gretry.emic.ucl.ac.be:C++/devel>

Anyone a clue? Thanks,

Ides

-- 
Ir Idesbald van den Bosch
PhD Student
3, Place du Levant - Bātiment Maxwell
1348		Louvain-la-Neuve
tel.: +32 (0)10 47 81 06
fax : +32 (0)10 47 87 05