would appreciate if I get pointer to following line of code
Char fileName[100] ;
strncpy(static_cast<Char *>( fileName),static_cast<const Char *>(getCurrentUser()),Int32(ML_STRING_SIZE));
I get Lint error: Cast from Pointer to Pointer. If I cast without static it throws error as C-style cast. If I do not use any cast
strncpy(( fileName),(getCurrentUser()),Int32(ML_STRING_SIZE)); it throws
array type passed to function expecting a pointer
I'm not sure how to fix it.
Here is the fix.
strncpy(( &fileName[0]),(getCurrentUser()),UInt32(ML_STRING_SIZE));
All three together solved the issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.