?
Solved

SIMPLE Question on Variables....

Posted on 2004-10-17
1
Medium Priority
?
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 1400 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 7 hours left to enroll

777 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