我需要按字母顺序排列第二个字母的单词列表,我似乎无法找到一种方法.
未排序:
smokelessly
toelike
arsenous
malabar
antiperspirant
hock
nibbing
paleographically
goon
Run Code Online (Sandbox Code Playgroud)
排序方式:
malabar
paleographically
nibbing
smokelessly
antiperspirant
hock
toelike
goon
arsenous
Run Code Online (Sandbox Code Playgroud)
我已经读过关于sort命令的信息,但它似乎没有让我这样做的功能?
我在尝试使用GCC编译程序时收到这些错误,但我不确定是什么导致它们.
functions.h:21: error: expected ')' before '[' token
functions.h:22: error: expected ')' before '[' token
functions.h:23: error: expected ')' before '[' token
functions.h:25: error: expected ')' before '[' token
functions.h:26: error: expected ')' before '[' token
functions.h:27: error: expected ')' before '[' token
Run Code Online (Sandbox Code Playgroud)
我的程序在visual studio 2012中编译得很好.
下面是看起来导致错误的头文件.
struct subject
{
char year[5];
char session;
char code[8];
char credit[3];
char mark[4];
};
struct data
{
char name[30];
char id[30];
char cc[30];
char course[80];
struct subject subjects[30];
int gpa;
};
void displayRecord(data …Run Code Online (Sandbox Code Playgroud)