C
- voluntas
- @ignis_fatuus
- ブン
- @Linda_pp
- 清楚なC++メイドBOT
- @tzik_tack
- 長谷川一輝
- wraith13
- @jj1bdx
- @cpp_akira
- 安藤敏彦
- @srz_zumix
- Siv3D
- takezoh
- まろ
- @okdshin
- @hnokx
- @ishidakei
- @take_cheeze
- TAKEI Yuya
- @mumumu
- I (@wx257osn2)
- Tommy6
- @tyottyoworks
- ___shanon
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
- むてら
- ガチKGB
- 三重野賢人
x
33
1
typedef int Element;
2
3
typedef struct a {
4
Element element;
5
struct a *left, *right;
6
} NodeT;
7
8
NodeT* allocateNode(Element e) {
9
return 0;
10
}
11
12
int insert(NodeT **pp, Element value)
13
{
14
15
if ((*pp)->element == value)
16
{
17
return 0;
18
}
19
20
else if ((*pp)->left->element > value)
21
{
22
(*pp)->left = allocateNode(value);
23
}
24
25
else
26
{
27
(*pp)->right = allocateNode(value);
28
}
29
}
30
31
int main() {
32
}
33
$ gcc prog.c -Wall -Wextra -std=gnu11
Start
prog.c: In function 'allocateNode': prog.c:8:29: warning: unused parameter 'e' [-Wunused-parameter] 8 | NodeT* allocateNode(Element e) { | ~~~~~~~~^ prog.c: In function 'insert': prog.c:29:1: warning: control reaches end of non-void function [-Wreturn-type] 29 | } | ^
0
Finish