如何在頭文件中創建靜態數組?我看了一些關於stackoverflow的例子,但無法讓他們工作。頭文件中的靜態數組 - C++
謝謝!
#ifndef DRUMKITLIBRARY_H_
#define DRUMKITLIBRARY_H_
class DrumKitLibrary
{
public:
static const char* const list[] = {"zip", "zam", "bam"};
};
#endif /* DRUMKITLIBRARY_H_ */
您看過哪些示例,哪些不起作用? –