Markup Posted February 8, 2011 Share Posted February 8, 2011 class client { public: client(blah& thing, . . .) : uno_(thing), dos_(thing) { What does the ":" after the function parameters do? Can't find any info anywhere Link to comment Share on other sites More sharing options...
opeious Posted February 8, 2011 Share Posted February 8, 2011 class student { public: int roll; int marks; protected: char name[50]; }; ':' indicates that from that point on all variables beyond that point are in public scope of the class (for "public:") Barrows Drops:....................................................Dragon Drops:...............Other Drops: Dharok: 2 Helms, 1 Top, 2 Legs, 4 Axes.......................2 Claws Split..................1 Bandos Tassets Karil: 1 Coif, 1 Top, 2 Skirt, 2 Crossbows......................3 Plate legs...................4 Berserker RingsAhrim: 3 Hood, 2 Top, 3 Skirt, 1 Staff..........................2 Plate Skirts.................2 Warrior RingsVerac: 1 Helm, 3 Tops, 2 Skirts, 1 Flail..........................1 Med........................1 Archer RingGuthan: 2 Helm, 5 Tops, 1 Skirt, 0 Spear.....................1 Shield Half.................1 Seers RingTorag: 2 Helms, 2 Tops, 5 Legs, 1 Hammer....................4 Hatchets..................1 Missed Divine Sigil (was at bank -,- fml) Link to comment Share on other sites More sharing options...
Markup Posted February 8, 2011 Author Share Posted February 8, 2011 class student { public: int roll; int marks; protected: char name[50]; }; ':' indicates that from that point on all variables beyond that point are in public scope of the class (for "public:") Sorry, forgot about the other ":" I mean the one in here:client(blah& thing, . . .) : uno_(thing), dos_(thing) Link to comment Share on other sites More sharing options...
Markup Posted February 8, 2011 Author Share Posted February 8, 2011 Sorted =] /en-US/library/dtey3c73(v=VS.100) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now