|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Member
Iscritto dal: Oct 2004
Città: goettingen
Messaggi: 275
|
[C++] domanda veloce sul private
se eredito da una classe non c'è proprio nessun trucco al mondo per vedere un metodo privato del genitore?
__________________
La prima necessità dell'uomo è il superfluo. Albert Einstein |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Iscritto dal: Nov 2005
Città: Texas
Messaggi: 1722
|
Quote:
Naturalmente si tratta di un controllo in compilazione. Se hai un puntatore all'oggetto e conosci l'offset dei dati che ti interessano, li puoi prelevare. Ma io non ti ho detto niente ![]()
__________________
In God we trust; all others bring data |
|
![]() |
![]() |
![]() |
#3 | |
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
Quote:
|
|
![]() |
![]() |
![]() |
#4 | |
Senior Member
Iscritto dal: Apr 2003
Città: Genova
Messaggi: 4741
|
Quote:
![]()
__________________
Jappilas is a character created by a friend for his own comic - I feel honored he allowed me to bear his name Saber's true name belongs to myth - a Heroic Soul out of legends, fighting in our time to fullfill her only wish Let her image remind of her story, and of the emotions that flew from my heart when i assisted to her Fate
|
|
![]() |
![]() |
![]() |
#5 |
Member
Iscritto dal: Oct 2004
Città: goettingen
Messaggi: 275
|
purtroppo non ci riesco perchè il costruttore copia gli attributi..
oltretutto ho scoperto che python non mi fa ereditare neppure i protected..
__________________
La prima necessità dell'uomo è il superfluo. Albert Einstein |
![]() |
![]() |
![]() |
#6 | |
Senior Member
Iscritto dal: May 2006
Città: Wursteland
Messaggi: 1749
|
Quote:
![]()
__________________
Nintendo WIII 4d Turbo Intercooler - Sestium X 666 99,312 GHz - 6.984 Ram Σ(9999) MHz - HDD SATA 97e^(10) bytes 93³ rpm - ATI biberon X900z ∞Mb - Win Eight SP (1 > yours) 16 Valve |
|
![]() |
![]() |
![]() |
#7 |
Member
Iscritto dal: Oct 2004
Città: goettingen
Messaggi: 275
|
ho architettato questo per estrarre un attributo protected con python:
class ShameOnMe : public TimeDependentPDE { public: real* t_add; ShameOnMe(BilinearForm& a, LinearForm& L, Mesh& mesh, BoundaryCondition& bc, int N, real T): TimeDependentPDE(a, L, mesh, bc, N, T) { t_add = &t; } }; importo l'header con python ed eredito da ShameOnMe in una nuova classe che ora non mi vede più quello che era public ![]()
__________________
La prima necessità dell'uomo è il superfluo. Albert Einstein Ultima modifica di giulioballio : 06-11-2006 alle 18:25. |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 08:51.