convert *void to void[]

gabrielsylar noreply at email.com
Wed May 6 02:30:45 PDT 2009


John C Wrote:

> gabrielsylar Wrote:
> 
> > can anybody please tell me how to properly convert from void* to void[]
> > as the code below?
> > 
> > void[] get_bytes(int n) { return sqlite3_column_blob(stmt, n); }
> 
> return sqlite3_column_blob(stmt, n)[0 .. n];

int i=sqlite3_column_bytes(stmt, n);
return sqlite3_column_blob(stmt, n)[0 .. i];

thanks, it works. and much simpler than i tought



More information about the Digitalmars-d-learn mailing list