共用方式為


<cstring>

定義傳統上定義標準的 c 程式庫標頭 <string.h> 中的巨集。

#if <TRADITIONAL C HEADERS>
   #include <string.h>
namespace std {
   using ::memchr; 
   using ::memcmp;
   using ::memcpy; 
   using ::memmove; 
   using ::memset;
   using ::size_t; 
   using ::strcat; 
   using ::strchr; 
   using ::strcmp;
   using ::strcoll; 
   using ::strcpy; 
   using ::strcspn;
   using ::strerror;
   using ::strlen;
   using ::strncat;
   using ::strncmp;
   using ::strncpy; 
   using ::strpbrk;
   using ::strrchr; 
   using ::strspn; 
   using ::strstr;
   using ::strtok; 
   using ::strxfrm;
}
#endif

備註

包括此標頭檔也可確保使用標準的 c 程式庫的標頭中的外部連結所宣告的名稱宣告在標準命名空間。 在此實作中,名稱也不也可以宣告全域命名空間,視特定轉譯的環境中。

請參閱

參考

標準 C++ 程式庫概觀

在標準 C++ 程式庫中的執行緒安全

其他資源

標頭檔