Page 20 of 20

Re: C++/C programming discussion

Posted: Thu Oct 28, 2010 3:14 pm
by Scott
Matthew wrote:I may look later as I'm on my iPhone at the moment. What is T?
It's a template typename. It is whatever the user of class defines it as. It can be <int>, <char>, <bool>, ect.

Re: C++/C programming discussion

Posted: Thu Oct 28, 2010 7:52 pm
by Matthew
Don't you need to delete the contents before add_on is called?

"GREAT.len() > 1 || LESS.len() > 1"

I don't think those will ever get smaller if they are only supposed to be sorted. You should do a tet at the beginning of the function to see if the list is more then one element or not.

Re: C++/C programming discussion

Posted: Thu Oct 28, 2010 8:55 pm
by Scott
Matthew wrote:Don't you need to delete the contents before add_on is called?
Delete what particular contents? You don't have to do anything except call add_on.
Matthew wrote:"GREAT.len() > 1 || LESS.len() > 1"

I don't think those will ever get smaller if they are only supposed to be sorted. You should do a tet at the beginning of the function to see if the list is more then one element or not.
I may do some small scale recursion tests so I can understand it better.

EDIT:

Attempting to get strings working with chamber is hard, and really, useless :8(: