appunti3s:casting
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | appunti3s:casting [2020/06/08 22:19] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== casting ====== | ||
+ | Come in linguaggio C si potrebbe usare la sintassi // | ||
+ | |||
+ | ===== static_cast< | ||
+ | Ad esempio, date due variabili intere //i// e //j//: | ||
+ | * < | ||
+ | * < | ||
+ | ===== Approfondimenti ===== | ||
+ | Per la cronaca, ci sono altri tipi di casting molto più complicati: | ||
+ | * const_cast | ||
+ | * reinterpretet_cast (con puntatori) | ||
+ | * dynamic_cast (con puntatori ad oggetti classe) | ||
+ | |||
+ | |||
appunti3s/casting.txt · Last modified: 2020/06/08 22:19 by 127.0.0.1