Solved

SIMPLE Question on Variables....

Posted on 2004-10-17
1
194 Views
Last Modified: 2010-04-23
I am writing a Irc client, and you will be seeing a lot more questions like this =) but, for this one, I want to accomplish this:

declare a new dcc, what im thinking is something like dim newdcc(dcc-cnt) as new dcc-connection

and under that variable newdcc() i would like

newdcc().ip
newdcc().filename
newdcc().port
newdcc().length

how would i go about creating that type of variable ? im just looking to declare it at this point...
0
Comment
Question by:addicktz
1 Comment
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 350 total points
ID: 12336105
Declare a Structure

Public Structure DCC_Connection
        Dim ip As String
        Dim filename As String
        Dim port As Integer
        Dim length As Long
    End Structure

Then you can have the above statement

However you wil not be able to use a variable in the array Dimension i.e. dcc-cnt

So what you can do is just declare

dim newdcc() as new dcc_connection

i.e. leave the dimension empty, then later on in your program you can write

ReDim  newdcc(dcc_Cnt)

This will work




0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now