Studio:Casting and pointers: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
A cast must be applied to a pointer before anything else. In other words, you must apply scl_cast before scl_ptr, as illustrated by the following example:< | A cast must be applied to a pointer before anything else. In other words, you must apply scl_cast before scl_ptr, as illustrated by the following example: | ||
<source lang="c"> | |||
#pragma scl_function(GetUnicodeName) | |||
#pragma scl_cast (GetUnicodeName, name, unsigned short*) | |||
#pragma scl_ptr (GetUnicodeName, name, OUT, PRIVATE) | |||
#pragma scl_string (GetUnicodeName, name, 100) | |||
</source> | |||
[[Category:Pointers]] | [[Category:Pointers]] |
Revision as of 00:00, 11 March 2008
A cast must be applied to a pointer before anything else. In other words, you must apply scl_cast before scl_ptr, as illustrated by the following example:
#pragma scl_function(GetUnicodeName)
#pragma scl_cast (GetUnicodeName, name, unsigned short*)
#pragma scl_ptr (GetUnicodeName, name, OUT, PRIVATE)
#pragma scl_string (GetUnicodeName, name, 100)