小编Jak*_*han的帖子

如何对字符串数组使用 qsort?

#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)

c string qsort

2
推荐指数
1
解决办法
1万
查看次数

如何移动到JTextField中的下一个标记

    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.我怎么告诉它移动到按下按钮时的空格

java swing jtextfield tablelayout

0
推荐指数
1
解决办法
87
查看次数

标签 统计

c ×1

java ×1

jtextfield ×1

qsort ×1

string ×1

swing ×1

tablelayout ×1