程式有些問題不懂

void getdata (char* inbuffer) { char a; int i; bzero (inbuffer, 255); printf (\"Please enter your data:\\n\"); for (i = 0; i != -1; i++) { if (a = getchar() == \'\\n\') { i = -2; // terminate for loop } else { inbuffer[i] =... show more void getdata (char* inbuffer) {
char a;
int i;
bzero (inbuffer, 255);
printf (\"Please enter your data:\\n\");
for (i = 0; i != -1; i++) {
if (a = getchar() == \'\\n\') {
i = -2; // terminate for loop
}
else {
inbuffer[i] = a;
}
}
}
---------------------------------------...
請問一下上面的bzero (inbuffer, 255);是什麼意思,還有if (a = getchar() == \'\\n\')這也不太懂,希望大大指點^^
2 answers 2