Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有一个 string 类型的 typedef 项,我如何使用 cout 将其打印出来?我不断收到“无法从typedefItemType转换为字符串”消息。
typedef string MyStrings[2]; ... MyStrings names = { "Brandon", "Programmer" }; for(int i = 0; i < sizeof(names) / sizeof(string); i++) { cout << names[i] << endl; }