0
我使用eclipse和mingw32。 我在rc文件中創建一個STRINGTABLE:C++字符串表.res文件
STRINGTABLE
BEGIN
IDS_HELLO, "Hello"
IDS_GOODBYE, "Goodbye"
END
,並編譯成res文件
我想在一個應用程序中使用這個STRINGTABLE。 也許我應該創建一個dll文件?或者是什麼?
這裏是我的主要應用程序,我想用:
#include <windows.h>
#include <iostream>
int main() {
// text.LoadString(IDS_HELLO) ; somewhere here...
return 0;
}
那麼編寫一個函數來加載字符串並返回一個std :: string(或std :: wstring)作爲結果? – WhozCraig 2013-03-18 20:29:49