UV纹理坐标与ST纹理坐标之间有什么区别?
我知道在OpenGL中使用UV和ST.
我也知道ST也用在Java中.
这是做什么的
while(*string) {
i = (i << 3) + (i<<1) + (*string -'0');
string++;
}
Run Code Online (Sandbox Code Playgroud)
*string -'0'
它会删除字符值或什么?
void decimal2binary(char *decimal, char *binary) {
//method information goes here
}
Run Code Online (Sandbox Code Playgroud)
这是主要的
int main(int argc, char **argv) {
char *data[100];
if (argc != 4) {
printf("invalid number of arguments\n");
return 1;
}
if (strcmp(argv[1] , "-d")) {
if (strcmp(argv[3] , "-b")) {
decimal2binary(temp, data);
}
}
}
Run Code Online (Sandbox Code Playgroud)
现在我收到了这个错误
warning: passing argument 2 of ‘decimal2binary’ from incompatible pointer type [enabled by default]
note: expected ‘char *’ but argument is of type ‘char **’
Run Code Online (Sandbox Code Playgroud)
所以它说它们是不兼容的类型,但我必须使用argv来获取数据(我被问到的方式)还有其他方法吗?
可能重复:
未定义pow()
void octal2decimal(char *octal, char *decimal) {
int oct = atoi(octal);
int dec = 0;
int p = 0;
while (oct!=0) {
dec = dec + (oct%10) * pow(8,p++); //since oct is base 8
oct/=10;
}
*decimal = (char)dec;
*/
}
Run Code Online (Sandbox Code Playgroud)
对于上面的以下代码我得到这个错误我不知道为什么我包括math.h但仍然我得到这个错误
/tmp/cck07bLe.o: In function 'octal2decimal':
data-converter.c:(.text+0x35f): undefined reference to 'pow'
collect2: ld returned 1 exit status
这是什么意思?我该如何解决?