1
00:00:00,000 --> 00:00:00,520

2
00:00:00,520 --> 00:00:03,530
>> SPEAKER: Ejja jikteb programm li
iqajjem l-utent għal żewġ kordi u

3
00:00:03,530 --> 00:00:07,170
imbagħad rapporti jekk dawk kordi
huma l-istess jew le l-istess.

4
00:00:07,170 --> 00:00:10,290
Stajt diġà bdew us off hawn minn
ssejjaħ printf darbtejn u ssejjaħ

5
00:00:10,290 --> 00:00:14,520
GetString darbtejn, ħażna ir-ritorn
valuri fil iu t, rispettivament.

6
00:00:14,520 --> 00:00:17,960
>> Issa, instincts tiegħi biex iqabblu dawn iż-żewġ
kordi tkun li jużaw l-familjari

7
00:00:17,960 --> 00:00:19,160
operatur ugwaljanza -

8
00:00:19,160 --> 00:00:22,070
jekk i ugwali ugwali t.

9
00:00:22,070 --> 00:00:28,120
Imbagħad jien ser imorru quddiem u print
out "Inti ttajpjati l-istess ħaġa!

10
00:00:28,120 --> 00:00:35,190
Else, jekk dan mhux veru, jien sempliċiment
ser tip printf ("Inti ittajpjat

11
00:00:35,190 --> 00:00:37,880
affarijiet differenti!

12
00:00:37,880 --> 00:00:38,850
>> Pjuttost sempliċi -

13
00:00:38,850 --> 00:00:41,820
Jien sempliċement billi nqabblu s kontra
t, u jekk dawn qed ugwali,

14
00:00:41,820 --> 00:00:43,250
istampar kemm.

15
00:00:43,250 --> 00:00:45,450
Ejja tiġbor u tmexxi dan il-programm.

16
00:00:45,450 --> 00:00:51,950
Jagħmlu jqabblu 0. / Tqabbel
0, ngħid xi ħaġa, hello,

17
00:00:51,950 --> 00:00:54,200
ngħid xi ħaġa, bonjour.

18
00:00:54,200 --> 00:00:56,870
>> Sfortunatament, il-programm jaħseb stajt
ittajpjat affarijiet differenti, anki jekk I

19
00:00:56,870 --> 00:00:59,530
ittajpjat b'mod ċar "bonjour" il-
istess mod kemm darbiet.

20
00:00:59,530 --> 00:01:00,850
Issa, għaliex jista 'jkun?

21
00:01:00,850 --> 00:01:03,750
>> Ukoll, jirriżulta li dan kollu
time, kordi kienu daqsxejn aktar

22
00:01:03,750 --> 00:01:06,780
kumplessi minn sekwenza ta 'karattri
taħt il-barnuża.

23
00:01:06,780 --> 00:01:11,450
Fir-realtà, string huwa pointer jew
indirizz, speċifikament l-indirizz

24
00:01:11,450 --> 00:01:14,640
tal-ewwel karattru li
sekwenza ta 'karattri.

25
00:01:14,640 --> 00:01:18,640
>> U hekk meta nqabblu s kontra t
bis-sinjal ugwali ugwali, aħna qed

26
00:01:18,640 --> 00:01:23,200
attwalment tistaqsi, huwa dan l-indirizz
daqs ugwali għal dan l-indirizz?

27
00:01:23,200 --> 00:01:26,850
U li mhux se jkun il-każ jekk
l-utent ikun ittajpjat f'żewġ differenti

28
00:01:26,850 --> 00:01:30,370
kordi u konna imsejħa GetString darbtejn
biex tikseb minnhom, minħabba li l-memorja

29
00:01:30,370 --> 00:01:34,480
li GetString juża biex jaħżnu l-ewwel
string jista 'jkun hawn fil RAM, iżda l-

30
00:01:34,480 --> 00:01:37,120
memorja li GetString juża biex jaħżnu
it-tieni sekwenza huwa għaddej

31
00:01:37,120 --> 00:01:38,760
li jkun hawn fil-RAM.

32
00:01:38,760 --> 00:01:42,380
U ovvjament, allura, dawn iż-żewġ biċċiet ta '
memorja indirizzi differenti għall-

33
00:01:42,380 --> 00:01:44,220
ewwel karattri tagħhom.

34
00:01:44,220 --> 00:01:46,120
>> Allura huwa s ugwali ugwali għal t?

35
00:01:46,120 --> 00:01:46,885
Well, no.

36
00:01:46,885 --> 00:01:50,510
Jekk iu t huma tipponta lejn differenti
biċċiet ta 'memorja, kif huma jkunu minn

37
00:01:50,510 --> 00:01:54,140
ssejjaħ GetString darbtejn, dawn mhux qed,
fil-fatt, ser ikunu l-istess.

38
00:01:54,140 --> 00:01:57,700
Għalhekk jidher li jkun il-każ li biex
iqabblu żewġ kordi fil-intuwittiv

39
00:01:57,700 --> 00:02:01,050
mod li nistennew, karattri għal
karattru, għandna bżonn teknika oħra

40
00:02:01,050 --> 00:02:02,300
għal kollox.

41
00:02:02,300 --> 00:02:03,902