Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using
Message
Information générale
Forum:
Visual C++
Catégorie:
Codage, syntaxe et commandes
Titre:
Using
Divers
Thread ID:
00669817
Message ID:
00669817
Vues:
45
Hi all,

hope someone can help... I'm working on something dealing with internet stuff and want to create my own wrapper class to handle some things. So to start, I have a class with and want an instance of CInternetSession to be a property on that class... such as...

class MyClass
{
public:
CInternetSession MySession;

.
.
.
};

However, when I try to compile it would error out requiring a parameter for the constructor method of the CInternetSession for the class. So, i would even change this portion to
(the single quotes are only due to messages not allowing for double quotes)

CInternetSession MySession( 'myApp' );

Then the compiler complains since the "definition" of the class is basically for abstract setup and can't process or set properties... They must be done in the constructor method...

So.... I tried just creating a pointer of this type...

CInternetSession *MyPointerToISession;

then in the constructor...

MyClass::MyClass()
{
MyPointerToISession = new (class CInternetSession);
..
..
}

And it complains again about needing the "parameter" for creation. Can someone please give me a hand on this one??? I'm drawing a blank, but am sure it can be done.

TIA,

Don

}
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform