ios - operand of type const void where arihmetic or pointer type required -
why getting error: operand if type const void arithmentic or pointer type required next line:
//insert info @ specific position in file
nsdata *chunk = chunkcontainer; // info nsuinteger insertpoint = chunkno*512; // insertion point // // create sure file exists, if does, next // nsdata *olddata = [nsdata datawithcontentsoffile:filepath]; // error checking nice... if (olddata) ... blah // nsoutputstream *stream = [[nsoutputstream alloc] inittofileatpath:filepath append:no]; [stream open]; [stream write:(uint8_t *)[olddata bytes] maxlength:insertpoint]; // write old info insertion point // [stream write:(uint8_t *)[chunk bytes] maxlength:[chunk length]]; // write new info // //the next line line geeting error @ [stream write:(uint8_t *)[olddata bytes][insertpoint] maxlength:([olddata length] - insertionpoint)]; // write rest of old info @ end of file // [stream close];
ios filestream iostream streamwriter
No comments:
Post a Comment