Hi I am trying to iterate over a mmfile (ubyte[]) and convert it to uint

void main(){
        MmFile inn = new MmFile("mmData.dat");
        ubyte[] arr = cast(ubyte[])inn[];
        for(ulong index = 0; index<arr.length; index+=4){
                ulong stop = index+4;   
                uint num  = littleEndianToNative!uint(arr[index..stop]);
        }
if i try to compile this i get the following error:
Error: template std.bitmanip.littleEndianToNative cannot deduce function from argument types !(uint)(ubyte[])

but if change the last line to:
uint num  = littleEndianToNative!uint(arr[30..34]);

then it compiles and runs...

Am I doing something wrong with my variables "index" and "stop"?
cheers
Kai T

Reply via email to