Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement