Solved

SIMPLE Question on Variables....

Posted on 2004-10-17
1
183 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 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