弱弱问一句c++中两个%什么意思?
怪我咯
怪我咯 2017-04-17 11:11:10
0
6
616
#define FILE_ICON "%APPPATH%,1"

%APPPATH% 是指?为什么两边要加上%

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(6)
PHPzhong

This %APPPATH% represents the environment variable of the Windows system, which is used to save the path and has nothing to do with C itself

巴扎黑

is just an ordinary string in C .

This string should be used to represent Windows environment variables. Windows environment variables have percent signs at the beginning and end.

PHPzhong

The % sign is only useful when formatting with printf, but only one is needed. If you are not formatting a string, just use it as an ordinary character, a raw character, which has no special meaning.

小葫芦

If you want to get the value of a windows environment variable, you need to use the getenv function

const char* pAppPath = getenv("APPPATH");
刘奇

Variables in Windows system paths are identified by double percent signs. %APPPATH% should be the path to the application.

Peter_Zhu

You can refer to the process of configuring the development environment in Java under win, and you will understand

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template