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

interior_ptr i njegove restrikcije nad tipovima?

[es] :: .NET :: interior_ptr i njegove restrikcije nad tipovima?

[ Pregleda: 430 | Odgovora: 1 ]

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Goran Arandjelovic
Goran Arandjelovic
Beograd

Član broj: 29116
Poruke: 246
77.46.224.*

Jabber: goranche@elitesecurity.org


Profil

icon interior_ptr i njegove restrikcije nad tipovima?07.07.2007. u 19:01

Jedno pitanje, verovatno vrlo prosto, ali nisam uspeo da nađem odgovor:

Zašto kao parametar interior_ptr ne može da ima ref klasu? (dok recimo dozvoljava da parametar bude vrednosni tip, a ne vidim zašto ne bi mogla biti i ref klasa...)

Dakle, zašto ovo nije dozvoljeno:

Code:

interior_ptr<System::String> ptr;
07.07.2007. u 19:01 

mmix
Miljan Mitrovic
Software Architect
Pancevo, Srbija

Moderator
Član broj: 17944
Poruke: 1572
*.logic.bm.



Profil

icon Re: interior_ptr i njegove restrikcije nad tipovima?09.07.2007. u 14:19
Managed tipovi moraju da imaju ^, probaj ovo

Code:

public ref class TestClass
{
    public:
    TestClass(void);
    System::String^ Test;
};

...

TestClass tt;
interior_ptr<System::String^> ptr = &tt.Test;


▪ The word 'politics' is derived from the word 'poly', meaning 'many', and the word 'ticks', meaning 'blood sucking parasites' - Larry Hardiman
▪ If the good guy gets the girl, it's rated PG; if the bad guy gets the girl, it's rated R; and if everybody gets the girl, it's rated X
▪ Illegal aliens have always been a problem in the United States. Ask any Native American
09.07.2007. u 14:19 

[es] :: .NET :: interior_ptr i njegove restrikcije nad tipovima?

[ Pregleda: 430 | Odgovora: 1 ]

Postavi temu Odgovori

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