Marsh Posted November 16, 2012 Author Share Posted November 16, 2012 Aero wanted this, figured it may come into handy for people trying to get into c++ and understand OOP programming. Just the basics. Pay attention to the order things happen. Link to comment Share on other sites More sharing options...
Mal Posted November 16, 2012 Share Posted November 16, 2012 Seeing that destructor and the way the declarations for the constructor and the code for it are split up made me cringe.. like bad.class Gun{public string Model { get; set; }public int RoundCount { get; set; }public float Range { get; set; }public Gun(int count, string model, float range){this.RoundCount = count;this.Model = model;this.Range = range;}}So much easier. Link to comment Share on other sites More sharing options...
Marsh Posted November 17, 2012 Author Share Posted November 17, 2012 Yup C# has its advantages. Link to comment Share on other sites More sharing options...
Marsh Posted January 28, 2013 Author Share Posted January 28, 2013 Also, you dont have to do that. It is done on purpose for OOP reasons. Its so you can take one quick look at a header file and know how to use the whole class without reading the code. You can put it all in one big spot if you want. 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