我有这个 C 代码:
#include <stdio.h>
#include <stdlib.h>
int main(){
char *bitstr;
printf("Enter a bitstring or q for quit: ");
scanf("%s", &bitstr);
return 0;
}
我不断收到以下错误。我究竟做错了什么?
warning: format '%s' expects argument of type 'char *', but
argument 2 has type 'char **' [-Wformat]