Tema: Re: VB.Net struktura
Autorius: zZz
Data: 2010-04-26 14:48:42
1. Masyvo pavadinimas - kaip nurodyta originale;
2. Kad nebūtų keista dėl non microsoft ir javos - 
http://msdn.microsoft.com/en-us/library/0b283bse.aspx

"Jornada Del Muerto" <ask@me.email> wrote in message 
news:hr3r1s$qae$1@trimpas.omnitel.net...
> Aha camel naming style, toks non microsoft ;) javoj butu normalu bet ant 
> VB keista ;)
>
>
> "zZz" <zZz@zirzilia.lt> wrote in message 
> news:hr389l$rbd$1@trimpas.omnitel.net...
>> Public tevuNr(5) As Integer ' ;)
>>
>> "va" <va@va.va> wrote in message news:hquupm$k2j$1@trimpas.omnitel.net...
>>> Bandau sitaip apsirasyta struktura su mastvaus viduje VC++ persidaryt i
>>> VB:
>>>
>>> struct mazgas {
>>>   char vardas;
>>>   int tevuKiek;
>>>   int tevuNr[5];
>>>   int tikKiek;
>>>   double tikim[32];
>>> };
>>> veliau galiu main'e puikiai kreiptis:
>>> mazgas tinklas[10];
>>> tinklas[0].vardas = 'L';
>>> tinklas[0].tevuNr[2] = 9;
>>> tinklas[0].tikim[0] = 0.987;
>>> cout << tinklas[0].tikim[0] << endl;
>>>
>>> Bandau ta pati pasidaryt VB:
>>>    Structure mazgas
>>>        Public name As String
>>>        Public tevuKiek As Integer
>>>        Public tevuNr() As Integer
>>>        Public tikKiek As Integer
>>>        Public tikim() As Double
>>>    End Structure
>>>
>>>    Sub Main()
>>>        Dim tinklas(20) As mazgas
>>>        tinklas(0).name = "vardas"
>>>        tinklas(0).tevuNr(0) = "5"
>>>        Console.WriteLine()
>>>   End Sub
>>>
>>> Kompliuojant gaunu      tinklas(0).tevuNr(0) = "5" eilutej Object
>>> reference not set to an instance of an object.
>>> Gal galetumet uzvest ant kelio, kaip ta reference'a uzsidet i ta tevuNr
>>> masyvuka?
>>>
>>> Aciu!
>>>
>>>
>>