Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Kako unsigned short int da prebacim u int?

[es] :: C/C++ programiranje :: Kako unsigned short int da prebacim u int?

[ Pregleda: 3488 | Odgovora: 10 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Predrag Damnjanovic
Predrag Damnjanovic
Nis, Srbija

Član broj: 141
Poruke: 1305
*.rcub.bg.ac.yu

Sajt: www.mycity.rs


+1 Profil

icon Kako unsigned short int da prebacim u int?02.09.2002. u 18:58 - pre 262 meseci
Pitanje je sad
 
Odgovor na temu

anon676

Član broj: 676
Poruke: 759
*.verat.net



Profil

icon Re: Kako unsigned short int da prebacim u int?02.09.2002. u 19:15 - pre 262 meseci
precesljaj stdib.h...cekaj
 
Odgovor na temu

Predrag Damnjanovic
Predrag Damnjanovic
Nis, Srbija

Član broj: 141
Poruke: 1305
*.rcub.bg.ac.yu

Sajt: www.mycity.rs


+1 Profil

icon Re: Kako unsigned short int da prebacim u int?02.09.2002. u 19:21 - pre 262 meseci
Nas'o sam
--> ntohs <---
 
Odgovor na temu

leka
Dejan Lekić
senior software engineer, 3Developers
Ltd.
London, UK

Član broj: 234
Poruke: 2534
*.racasse.se

Sajt: dejan.lekic.org


+2 Profil

icon Re: Kako unsigned short int da prebacim u int?02.09.2002. u 21:15 - pre 262 meseci
Peco... Nemam komentara... :(
Dejan Lekic
software engineer, MySQL/PgSQL DBA, sysadmin
 
Odgovor na temu

Ivan Dimkovic

Administrator
Član broj: 13
Poruke: 16683
*.mcbone.net



+7169 Profil

icon Re: Kako unsigned short int da prebacim u int?02.09.2002. u 21:25 - pre 262 meseci
Obicno je jedan operator = dovoljan :)

DigiCortex (ex. SpikeFun) - Cortical Neural Network Simulator:
http://www.digicortex.net/node/1 Videos: http://www.digicortex.net/node/17 Gallery: http://www.digicortex.net/node/25
PowerMonkey - Redyce CPU Power Waste and gain performance! - https://github.com/psyq321/PowerMonkey
 
Odgovor na temu

Ivan Dimkovic

Administrator
Član broj: 13
Poruke: 16683
*.mcbone.net



+7169 Profil

icon Re: Kako unsigned short int da prebacim u int?02.09.2002. u 21:30 - pre 262 meseci
A, ako nece (c++ kompajler) .. a ti ga onda ubedis jednim castingom :)

DigiCortex (ex. SpikeFun) - Cortical Neural Network Simulator:
http://www.digicortex.net/node/1 Videos: http://www.digicortex.net/node/17 Gallery: http://www.digicortex.net/node/25
PowerMonkey - Redyce CPU Power Waste and gain performance! - https://github.com/psyq321/PowerMonkey
 
Odgovor na temu

Dragi Tata
Malo ispod Kanade

Član broj: 1958
Poruke: 3906
..g-c5300-1.dialup.nethere.net



+6 Profil

icon Re: Kako unsigned short int da prebacim u int?02.09.2002. u 21:37 - pre 262 meseci
ntohs prebacuje 16 - bitne vrednosti sa Big Endian na Little Endian (kod Intel x86 platformi)
 
Odgovor na temu

Ivan Dimkovic

Administrator
Član broj: 13
Poruke: 16683
*.mcbone.net



+7169 Profil

icon Re: Kako unsigned short int da prebacim u int?02.09.2002. u 21:49 - pre 262 meseci
Peco - htons() i ntohs() ces obicno koristiti ako radis sa socket bibliotekom - ali mislim da si pitao nesto drugo - ili nisi dobro formulisao pitanje ili si nasao losu funkciju :)

DigiCortex (ex. SpikeFun) - Cortical Neural Network Simulator:
http://www.digicortex.net/node/1 Videos: http://www.digicortex.net/node/17 Gallery: http://www.digicortex.net/node/25
PowerMonkey - Redyce CPU Power Waste and gain performance! - https://github.com/psyq321/PowerMonkey
 
Odgovor na temu

doomed
NS/PO

Član broj: 736
Poruke: 180
*.ptt.yu



Profil

icon Re: Kako unsigned short int da prebacim u int?12.09.2002. u 02:39 - pre 262 meseci
Citat:
Ivan Dimkovic:
A, ako nece (c++ kompajler) .. a ti ga onda ubedis jednim castingom :)


ili malo zogliranja sa memcpy !?
Ako treba onda nema potrebe
 
Odgovor na temu

Predrag Damnjanovic
Predrag Damnjanovic
Nis, Srbija

Član broj: 141
Poruke: 1305
*.bankerinter.net

Sajt: www.mycity.rs


+1 Profil

icon Re: Kako unsigned short int da prebacim u int?12.09.2002. u 13:54 - pre 262 meseci
port=ntohs(cli_addr.sin_port);
is this OK?
 
Odgovor na temu

Ivan Dimkovic

Administrator
Član broj: 13
Poruke: 16683
*.telemaxx.net



+7169 Profil

icon Re: Kako unsigned short int da prebacim u int?12.09.2002. u 14:08 - pre 262 meseci
Da, jeste

DigiCortex (ex. SpikeFun) - Cortical Neural Network Simulator:
http://www.digicortex.net/node/1 Videos: http://www.digicortex.net/node/17 Gallery: http://www.digicortex.net/node/25
PowerMonkey - Redyce CPU Power Waste and gain performance! - https://github.com/psyq321/PowerMonkey
 
Odgovor na temu

[es] :: C/C++ programiranje :: Kako unsigned short int da prebacim u int?

[ Pregleda: 3488 | Odgovora: 10 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.