I am defining a class that has, as a member, an array of another
user-defined class.
private mBoard as CBoardPosition()
The problem comes when I attempt to size the array, it should be an 8x8
grid. When I use:
mBoard = New CBoardPosition (7,7)
When I do this, VB thinks I am trying to send two integers to the New
function of the class, not defining it as a 8x8 2d array. This results
in an error as the new function of CBoardPosition takes no parameters.
What is the proper syntax for this? I know I must be missing something
simple. 5 1871
Hi,
Try this:
Private mBoard(7,7) As CBoardPosition = New CBoardPosition()
Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try: http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
"HateSpam" <Ha******@nospam.com> wrote in message
news:8f*****************@fe2.columbus.rr.com... I am defining a class that has, as a member, an array of another user-defined class.
private mBoard as CBoardPosition()
The problem comes when I attempt to size the array, it should be an 8x8 grid. When I use:
mBoard = New CBoardPosition (7,7)
When I do this, VB thinks I am trying to send two integers to the New function of the class, not defining it as a 8x8 2d array. This results in an error as the new function of CBoardPosition takes no parameters.
What is the proper syntax for this? I know I must be missing something simple.
Please do not multi-post. Instead, you can cross-post - post to all groups
at the same time.
"HateSpam" <Ha******@nospam.com> wrote in message
news:8f*****************@fe2.columbus.rr.com... I am defining a class that has, as a member, an array of another user-defined class.
private mBoard as CBoardPosition()
The problem comes when I attempt to size the array, it should be an 8x8 grid. When I use:
mBoard = New CBoardPosition (7,7)
When I do this, VB thinks I am trying to send two integers to the New function of the class, not defining it as a 8x8 2d array. This results in an error as the new function of CBoardPosition takes no parameters.
What is the proper syntax for this? I know I must be missing something simple.
> Private mBoard(7,7) As CBoardPosition = New CBoardPosition()
Wouldn't that throw up a compile time error saying something like explicit
initialization not permitted for arrays?
see reply in dotnet.languages.vb group.
"Imran Koradia" <no****@microsoft.com> wrote in message
news:uN**************@TK2MSFTNGP09.phx.gbl... Please do not multi-post. Instead, you can cross-post - post to all groups at the same time.
Hi,
Yeah, you're right. What was I thinking? Use this instead:
Private mBoard(,) As CBoardPosition
Then to size it:
ReDim mBoard(7,7)
Sorry about that. Ken.
That'll do it. Then
"Imran Koradia" <no****@microsoft.com> wrote in message
news:eK**************@tk2msftngp13.phx.gbl... Private mBoard(7,7) As CBoardPosition = New CBoardPosition() Wouldn't that throw up a compile time error saying something like explicit initialization not permitted for arrays? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: claudel |
last post by:
Hi
I have a newb PHP/Javascript question regarding checkbox processing
I'm not sure which area it falls into so I crossposted to comp.lang.php
and comp.lang.javascript.
I'm trying to...
|
by: claudel |
last post by:
Hi
I have a newb PHP/Javascript question regarding checkbox processing
I'm not sure which area it falls into so I crossposted to comp.lang.php
and comp.lang.javascript.
I'm trying to...
|
by: User |
last post by:
Hi,
This is very basic, It may be a repost, if so I'm sorry.
The problem is that this declaration :
Private strMyArray(100) As String
will create an array of string with a length of 101,...
|
by: Sam |
last post by:
Hello all
I have a two dimensional array (the dimensions are not known) that
needs to be passed
to fortran from c++, allocate the dimensions of the array in fortran
code, do some filling up
of...
|
by: Chris |
last post by:
I've lurked around long enough... Time to interract =)
I'm trying to make sense of the following. I can't quite wrap my head
around what this is actually doing:
-------------
typedef enum {...
|
by: HateSpam |
last post by:
I am defining a class that has, as a member, an array of another
user-defined class.
private mBoard as CBoardPosition()
The problem comes when I attempt to size the array, it should be an 8x8...
|
by: tommydogs |
last post by:
I am just starting out with AxWebBrowser and need help with a simple
application. I just want to navigate to a web page, then read in
source code. Here's what I have so far:
Private Sub...
|
by: =?Utf-8?B?U2hhcm9u?= |
last post by:
Hi Gurus,
I need to transfer a jagged array of byte by reference to unmanaged
function, The unmanaged code should changed the values of the array, and when
the unmanaged function returns I need...
|
by: mdh |
last post by:
>From p112 ( K&R).
Given an array declared as
static char arr= { { 0,1,........},{0,1,.....}};
let arr be passed as an argument to f.
f( int (*arr) ) {....}
It is noted that the...
|
by: aruna.mysore |
last post by:
Hi all,
I have a specific problem passing a function pointer array as a
parameter to a function. I am trying to use a function which takes a
function pointer array as an argument. I am too sure...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |