I have been using C++ for several years. Then I decided to use Fortran for better math performance. In C++ I have the following structure which I use everywhere:
structure BitMap{
char* rgba; // pointer to the color array
int w, h;}; // dimension of my bitmap
In Fortran, on the other hand:
Program Bitmap_p
implicit none
type BitMap
character :: rgba(*) ! like a pointer to bitmap array (colors and alpha)
integer:: w ! bitmap width
integer:: h ! bitmap height
endtype BitMap
endprogram Bitmap_p
However, when compiling this, the compilers states:
- f90 (4): error #6530: The array spec for this component must be of explicit shape and each bound must be an initialization expression. [RGBA]