shadok's Profile
Reputation: 2
Apprentice
- Group:
- Members
- Active Posts:
- 36 (0.16 per day)
- Joined:
- 08-October 12
- Profile Views:
- 163
- Last Active:
Dec 04 2012 08:24 PM- Currently:
- Offline
Previous Fields
- Country:
- US
- OS Preference:
- Windows
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- PC
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Finding Average of Variables Within Array
Posted 4 Dec 2012
Messing around some more, I've realized that putting my destructor into comments fixes this. Should I just take that out, or do I simply need to change it in some way? I'm relatively certain I need one, so I'm not quite sure what to do here. -
In Topic: Using Functions w/ Classes && Saving Data to Class
Posted 4 Dec 2012
And apparently I'm a moron. I finally figured it all out. I was not taking data into my constructors unless it was sent there directly in main, but figured out how to do that. My issue with the function was that rather than use my accessors to set variables to the correct values within the function, I was trying to pull the actual values themselves directly to the function. It took quite a bit of time and frustration, but I figured it out. Thanks for the input! -
In Topic: Using Functions w/ Classes && Saving Data to Class
Posted 3 Dec 2012
I only know how to write a constructor that uses similar syntax to a struct (I believe) since I have a bit of experience with those. That's why I had no issue with things like joy.setName and so on. My confusion with constructors stems from the fact that the syntax within the main function for employee susan is completely different. Since ("Susan Meyers", 47899, "Accounting", "Vice President") is just a collection of the variables, I'm unsure of how to actually assign those to the proper variables. Once I figure that out, I'm sure I can figure out employee mark, as it appears to be a combination of the others.
So far I've tried passing the class (employee), I've tried to pass the object employee susan, I've tried passing the variables individually from each of my get functions (ie getName()). When I pass the object it comes up as undefined within the function. The fact that even passing the individual variables isn't working just has me more confused. At that point I was basically trying to get anything into the function just to form a better understanding of how the syntax worked. -
In Topic: Using Functions w/ Classes && Saving Data to Class
Posted 3 Dec 2012
I should have mentioned that everything in main was given to me to test my class. The issue that I'm having is my class, and my function. I need different constructors so that I can accept all of the data, and I BELIEVE I need a function to output the data. My issue here is really just setting up the other 2 constructors, and then passing the data to the function displayEmployee(). I apologize for neglecting to point that out. -
In Topic: Calling Struct Into Function / Returning Double
Posted 1 Dec 2012
Alright, got that part of the code working, thanks for the help!
My Information
- Member Title:
- New D.I.C Head
- Age:
- 20 years old
- Birthday:
- December 2, 1992
- Gender:
-
- Programming Languages:
- C++
Contact Information
- E-mail:
- Private
Friends
shadok hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
shadok has no profile comments yet. Why not say hello?