1
00:00:00,000 --> 00:00:03,250
>> SPIKA 1: Hebu sasa kuandika mpango
wao kweli kulinganisha na masharti mawili

2
00:00:03,250 --> 00:00:04,245
tabia kwa tabia.

3
00:00:04,245 --> 00:00:06,830
Hebu kutumia kulinganisha 0 kama
yetu kuanzia.

4
00:00:06,830 --> 00:00:11,550
Lakini hebu peel ya kwanza ya nyuma safu kwamba
ni ya aina kamba na kuandika upya ni

5
00:00:11,550 --> 00:00:14,120
kwa nini ni kweli ni, ambayo
ni nyota char.

6
00:00:14,120 --> 00:00:17,740
Hiyo ni anwani ya tabia,
hasa tabia ya kwanza katika

7
00:00:17,740 --> 00:00:21,010
mlolongo wa wahusika kwamba tunatarajia zaidi
kwa ujumla kujua kama kamba.

8
00:00:21,010 --> 00:00:21,880
>> Same kwa t.

9
00:00:21,880 --> 00:00:25,660
Hebu kuandika upya kwamba kamba tamko
kama char nyota.

10
00:00:25,660 --> 00:00:28,690
Na sasa tunahitaji tena
kulinganisha dhidi ya t, ili

11
00:00:28,690 --> 00:00:30,150
sisi kulinganisha anwani mbili.

12
00:00:30,150 --> 00:00:33,180
Tunataka kweli kulinganisha
masharti mawili wenyewe.

13
00:00:33,180 --> 00:00:37,520
Kwa kufanya hivyo, tunaweza kutumia kazi
alitangaza katika string.h.

14
00:00:37,520 --> 00:00:40,920
Basi, mimi itabidi kuongeza kuwa ni pamoja na
juu ya faili yangu.

15
00:00:40,920 --> 00:00:43,130
>> Na kisha mimi nina kwenda na mabadiliko ya
line hii hapa.

16
00:00:43,130 --> 00:00:47,920
Badala ya kulinganisha dhidi ya t, mimi nina
kwenda kuwaita kazi koroga Comp,

17
00:00:47,920 --> 00:00:52,290
kwa kamba kulinganisha, na kupita
katika kama hoja s na t.

18
00:00:52,290 --> 00:00:56,480
Tutaweza kuahirisha kisha kwa kamba kulinganisha na
kufikiri kama s na t kweli ni sawa

19
00:00:56,480 --> 00:00:59,870
na basi ni kufikiri jinsi ya kulinganisha
yao tabia kwa tabia.

20
00:00:59,870 --> 00:01:02,410
>> Sasa, kulingana na nyaraka
kwa kamba kulinganisha, ni kweli

21
00:01:02,410 --> 00:01:06,920
kwenda na kurudi 0 ikiwa masharti mawili
alisema katika na s na t ni sawa.

22
00:01:06,920 --> 00:01:09,490
Ni kwenda na kurudi namba hasi
kama s waje kabla ya t

23
00:01:09,490 --> 00:01:13,740
alphabetically au idadi chanya kama
s waje baada ya t alphabetically.

24
00:01:13,740 --> 00:01:16,090
>> Lakini kwa sasa, sisi tu huduma
kuhusu usawa.

25
00:01:16,090 --> 00:01:19,270
Hivyo mimi nina kwenda kupima tu kama
thamani ya kurudi kamba kulinganisha,

26
00:01:19,270 --> 00:01:21,450
kupita katika s na t, ni sawa na 0.

27
00:01:21,450 --> 00:01:24,940
Na kama ni hivyo, mimi nina kwenda kudai kwamba
masharti mawili ni sawa.

28
00:01:24,940 --> 00:01:26,820
>> Lakini mimi nina kwenda kufanya moja
mabadiliko mengine pia.

29
00:01:26,820 --> 00:01:30,410
Ni zamu nje kamba kwamba kupata, kwa yake
nyaraka, wakati mwingine kurudi

30
00:01:30,410 --> 00:01:34,320
null, mwangalizi thamani kwamba, kwa mujibu
kupata masharti nyaraka, njia

31
00:01:34,320 --> 00:01:35,450
kitu mbaya kilichotokea.

32
00:01:35,450 --> 00:01:38,830
Kwa mfano, sisi mbio nje ya kumbukumbu au
user kwa namna fulani hakuwa kushirikiana.

33
00:01:38,830 --> 00:01:41,080
>> Kamba kulinganisha, wakati huo huo,
ni kidogo tete.

34
00:01:41,080 --> 00:01:44,730
Kama kupita null kwa aidha yake
kwanza au hoja ya pili yake, mbaya

35
00:01:44,730 --> 00:01:45,650
mambo yanaweza kutokea.

36
00:01:45,650 --> 00:01:47,970
Mambo mabaya kwa kawaida kuwashirikisha
segmentation makosa.

37
00:01:47,970 --> 00:01:52,210
Hivyo ili kuepuka uwezekano kwamba kabisa,
Mimi kwanza kwenda kufuta hii matumizi ya

38
00:01:52,210 --> 00:01:56,350
kamba kulinganisha na indenting yote hii
kuzuia wa kanuni na ya kwanza kufanya tu

39
00:01:56,350 --> 00:02:03,140
kwamba kama s si sawa na null
na t si sawa na null.

40
00:02:03,140 --> 00:02:08,280
>> Kumalizika kwa mpango kwamba kama mwingine kujenga kwamba mimi
typed mapema na braces curly kama

41
00:02:08,280 --> 00:02:12,270
vizuri, hivyo kwamba wakati huu mimi tu kugusa
s na t kama mimi nina uhakika kwamba

42
00:02:12,270 --> 00:02:13,450
wao ni si null.

43
00:02:13,450 --> 00:02:17,220
Hebu sasa kuokoa, kukusanya, na
tena kuendesha mpango huu.

44
00:02:17,220 --> 00:02:22,240
>> Kufanya kulinganisha 1 dot slash kulinganisha 1.

45
00:02:22,240 --> 00:02:23,950
Mimi itabidi kusema hello tena.

46
00:02:23,950 --> 00:02:25,890
Ikifuatiwa na hujambo tena.

47
00:02:25,890 --> 00:02:28,110
Na wakati huu, mimi kweli
aina kitu kimoja.

48
00:02:28,110 --> 00:02:30,255