#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int sortstring(const void *str1, const void *str2) {
const char *rec1 = str1;
const char *rec2 = str2;
}
void sortutil(char* lines[]) {
qsort(lines, 200, sizeof(char), sortstring);
}
Run Code Online (Sandbox Code Playgroud)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "sortutil.h"
int getarray(char *lines[]) {
int i = 0;
char *text = (char *)malloc(200);
while (fgets(text, 200, stdin) != NULL) {
lines[i] = text;
i++;
text = (char *)malloc(200);
}
return i;
}
void printarray(char *lines[], int max) { …Run Code Online (Sandbox Code Playgroud) else if (cmd.equals("five"))
{
infixInput.setText("5");
}
else if (cmd.equals("six"))
{
infixInput.setText("6");
}
Run Code Online (Sandbox Code Playgroud)
所以我设置了当你按下calc按钮时,数字显示在中缀文本字段上,但是如果我输入5,那么6例如,6只会替换5.我怎么告诉它移动到按下按钮时的空格