| adm | Find | login register |
eliu joined: 2007-08-09 posted: 11478 promoted: 617 bookmarked: 187 新竹, 台灣 |
最近在 Windows Visual Studio 開發,不知道什麼時候加入了 ^ 這個怪東西,也就是可以 garbage collection 的 managed variable。.NET 的 environment 很多這種 managed variables,想用以前熟悉的 libc function 如 strncmp 結果都不行,因為這些是 Unmanaged function. 真是麻煩。 edited: 1
| |||||||
eliu joined: 2007-08-09 posted: 11478 promoted: 617 bookmarked: 187 新竹, 台灣 |
本來想用 .NET 裡面的 function,很多 function 的 parameter 都是用 String, 搞不懂的是 UTF-16 的 char 並不是 16-bit ,而是 16 or 32 bit。所以是否真的有把問題簡化 ?
Visual C++
// Unicode Mathematical operators wchar_t charArray1[4] = {L'\x2200',L'\x2202',L'\x200F',L'\x2205'}; wchar_t * lptstr1 = &charArray1[ 0 ]; String^ wszMathSymbols = gcnew String( lptstr1 ); // Unicode Letterlike Symbols wchar_t charArray2[4] = {L'\x2111',L'\x2118',L'\x2122',L'\x2126'}; wchar_t * lptstr2 = &charArray2[ 0 ]; String^ wszLetterLike = gcnew String( lptstr2 ); // Compare Strings - the result is false Console::WriteLine( String::Concat( L"The Strings are equal? ", (0 == String::Compare( wszLetterLike, wszMathSymbols ) ? (String^)"TRUE" : "FALSE") ) ); edited: 1
| |||||||
企鵝狂 joined: 2008-04-01 posted: 185 promoted: 20 bookmarked: 7 |
| |||||||
eliu joined: 2007-08-09 posted: 11478 promoted: 617 bookmarked: 187 新竹, 台灣 |
|
| adm | Find | login register |