need some help

Hello friends,
I had seen some coding like thins on the internet and i have confusion regarding to that
code look like this...

class myclass
{
public:
static myclass *abc(___Some para__)
{
.....
.....
return new myclass(___);
}
myclass(___)
{
}
};

Is that possible???? and if "yes"
how can i call this in to main class?
Is there any other alternative????
This is possible. It's what's called a class. They are a very important feature of C++, without which it could not enable object oriented programming.

This website's classes tutorial is a good starting point
http://www.cplusplus.com/doc/tutorial/classes/
http://www.cplusplus.com/doc/tutorial/classes2/

EDIT: As Framework says, the argument lists aren't correct, although perhaps you just meant them to be placeholders?
Last edited on
closed account (zb0S216C)
myclass is the identifier of the class, therefore, you cannot give member methods the name of myclass, unless it's a constructor, or destructor. Also, __Some, and para__ are invalid arguments. Until __Some, and para__ are given valid type-specifiers, your code appears to be wrong.

Wazzak
Last edited on
@Framework, I thought the OP merely meant them to be placeholders for actual parameter lists. Perhaps I misunderstood though...
Topic archived. No new replies allowed.