|
-
April 21st, 1999, 01:10 PM
#1
Passing Class Array as pointer to function
What is the best way to pass an instance of a class myclass[7] to a function as an arguement?
-
April 21st, 1999, 01:27 PM
#2
Re: Passing Class Array as pointer to function
One way:
void YourFunction(myclass myClassArray[], int nElements);
-
April 27th, 1999, 09:09 AM
#3
Re: Passing Class Array as pointer to function
Example:
void MyFunction( CMyDialog *pDialog )
{
//function body
}
...
void CSomeWhere::Something()
{
CMyDialog MyDialog[10];
//Pass a class pointer to our function
MyFunction( &MyDialog[7] );
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|