Anonymous object ?? 
Author Message
 Anonymous object ??

Hi Guys,

I am wondering if it is possible to create an anonymous object call in
C++.NET the same way we can do in C# for example:

returnval =  new ShareObjectStrProc (ConnStr).MapObjects (ShareEnum,
ParaList);  // code in c#

????? // in C++.NET

Thanks in advance

Reza



Sun, 20 Feb 2005 02:40:07 GMT  
 Anonymous object ??

Quote:

> I am wondering if it is possible to create an anonymous object call in
> C++.NET the same way we can do in C# for example:

> returnval =  new ShareObjectStrProc (ConnStr).MapObjects (ShareEnum,
> ParaList);  // code in c#

> ????? // in C++.NET

Hello again!
  Remember that 'new' returns a pointer, so you need to use the -> operator.

   (new ShareObjectStrProc(ConnStr))->MapObjects(ShareEnum, ParaList);

Hope that helps... Cheerio!

--
Brandon Bray                                            Visual C++ Compiler
This posting is provided "AS IS" with no warranties, and confers no rights.



Sun, 20 Feb 2005 00:55:03 GMT  
 Anonymous object ??
Thanks :)

Reza


Quote:

> > I am wondering if it is possible to create an anonymous object call in
> > C++.NET the same way we can do in C# for example:

> > returnval =  new ShareObjectStrProc (ConnStr).MapObjects (ShareEnum,
> > ParaList);  // code in c#

> > ????? // in C++.NET

> Hello again!
>   Remember that 'new' returns a pointer, so you need to use the ->
operator.

>    (new ShareObjectStrProc(ConnStr))->MapObjects(ShareEnum, ParaList);

> Hope that helps... Cheerio!

> --
> Brandon Bray                                            Visual C++
Compiler
> This posting is provided "AS IS" with no warranties, and confers no
rights.



Sun, 20 Feb 2005 04:11:29 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Anonymous union in VC++ 7

2. about "anonymous union" problem

3. anonymous struct

4. anonymous methods

5. anonymous functions in c

6. A Jazzy NULL, and ctors for Anonymous Classes

7. Anonymous sub-structures and GCC

8. tricky casting question with anonymous structs

9. anonymous structs and unions : legal?

10. dereferencing anonymous pointers

11. Anonymous unions

12. Anonymous unions in C with gcc?

 

 
Powered by phpBB® Forum Software