Well, if there's no default constructor, you can still use it as a non-pointer, you just have to make sure that the enclosing object calls an appropriate constructor.
[quote=Impactus]I noticed that I can use the type in the struct if I use it as a pointer. However, I'd also like to be able to pass it to functions.[/quote]
I'm not sure I see the problem here. You can pass references and pointers to functions, so why would a pointer prevent you from passing it to functions?
It would probab
The problem definitely isn't because you don't have Socket declared. It is, in socket.h and included with server.h. As for why you can't use this:
[code]
class Player
{ public:
string name;
Socket connection;
};
[/code]
Is because the Socket class no longer has a default constructor. It also doesn't have a copy constructor so probably a good idea not to use references!
Actually, I was pretty surprised that this topic even made it to 50 posts. Rofl.
- Zenn
[quote=DavidHaley]Yes, except the "arm-chair priests" are the ones who stir up the crapstorm to ostracize people from the community for doing something that might or might not be illegal...[/quote]
This i tend to agree with. The moral police do a great job of demonizing and isolating anyone who does not follow their own beliefs in regards to the spirit of the license. Which is why a debate about morals or ethics on this topic would just become a flame fest. Some hold the Diku team up as gods
Yes, except the "arm-chair priests" are the ones who stir up the crapstorm to ostracize people from the community for doing something that might or might not be illegal...