过去,每当我遇到#define 时,它都被用作
#define MOD 1000000007
在上述情况下,代码中的所有 MOD 实例都被替换为 1000000007。
我是开源开发的新手,正在研究 VLC 媒体播放器的几个视频过滤器。它有多种用途#define
——
//example1
#define MSG_LONGTEXT N_( \
"Marquee text to display. " \
"(Available format strings: " \
"Time related: %Y = year, %m = month, %d = day, %H = hour, " \
"%M = minute, %S = second, ... " \
"Meta data related: $a = artist, $b = album, $c = copyright, " \
"$d = description, $e = encoded by, $g = genre, " \
"$l = language, $n = track num, $p = now playing, " \
"$r = rating, $s = subtitles language, $t = title, "\
"$u = url, $A = date, " \
"$B = audio bitrate (in kb/s), $C = chapter," \
"$D = duration, $F = full name with path, $I = title, "\
"$L = time left, " \
"$N = name, $O = audio language, $P = position (in %), $R = rate, " \
"$S = audio sample rate (in kHz), " \
"$T = time, $U = publisher, $V = volume, $_ = new line) ")
//example 2
#define POSY_TEXT N_("Y offset")
//example 3
#define TIMEOUT_LONGTEXT N_("Number of milliseconds the marquee must remain " \
"displayed. Default value is " \
"0 (remains forever).")
有人可以解释这些例子吗
#define
和软件开发两者还是提供一些资源?