Type: Posts; User: TSLexi
Search took 0.01 seconds.
March 1st, 2014, 04:18 PM
Actually, for iterating through an array, you don't need to pass a variable for the size; just write:
for (auto& val: arrayname)
//do useful stuff
February 28th, 2014, 02:22 PM
Well, the instructor required us to write getter and setter methods for Employee's data members.
Also, as of yet, we have no idea if the implementation of Employee will significantly change in its...
February 27th, 2014, 06:02 PM
OK, here's the final version (I modified the move ctor so it just switches the pointers around):
February 26th, 2014, 06:29 PM
Also, should my functions pass arguments by value, by const lvalue ref, or by rvalue ref?
February 26th, 2014, 05:45 PM
He told us we'll be inheriting from Employee in later assignments.
February 26th, 2014, 04:51 PM
I'd like some advice on my C++ homework, which is to create an Employee class with three data members (first name, last name, and salary), accessor methods for each, and a function to...
February 3rd, 2014, 12:37 PM
I'm writing and running this on my Samsung S4.
February 2nd, 2014, 04:44 AM
So we've moved from arguing execution speed to arguing compile speed...compile in the cloud for fast compilation, execute on multi-core chipsets for fast execution.
February 2nd, 2014, 12:31 AM
Functor(const Functor & rhs) = default;
virtual ~Functor() =default;
virtual float operator() (const FloatV & input) const =0;
February 1st, 2014, 11:47 PM
Why won't the committee require compilers to implement devirtualization in order to be compliant?
February 1st, 2014, 06:39 PM
The C++ standard should require compilers to support devirtualization in order to be compliant.
TMP is wonderful for automatic code-generation, but an exercise in psychosis for code-optimization....
February 1st, 2014, 06:02 PM
February 1st, 2014, 05:47 PM
If your design method is completely based on a compiler flaw, you shouldn't be programming. It's a recipe for unmaintainable code
February 1st, 2014, 05:13 PM
That's the point I was trying to make. CRTP is an idiom only needed if your compiler lacks the ability to devirtualize your virtual function calls after static code analysis determines dynamic...
February 1st, 2014, 01:06 PM
That was an awesome reply. When would *you* use CRTP over virtual functions? When your design says that the pointed to object can never be changed at runtime?
I just "get" virtual functions. I...
January 31st, 2014, 11:51 PM
Just need to get a microSD card and buy the ROEHSOFT Memory Expander from Google Play. Then it should work.
The multi-threading component of the stdlib is 64-bit, so my 2GB 32-bit system runs out...
January 31st, 2014, 07:44 PM
Apparently GCC requires 3.1GiB of RAM to compile this simple program...
January 31st, 2014, 06:27 PM
I'd like some advice on designing and implementing my neural network class. It has three input neurons, four hidden neurons (one of which is a bias neuron, having the connections from...
January 31st, 2014, 03:49 AM
I was reading about the CRTP, and I can't for the life of me understand it's advantages over virtual functions.
Unless you're coding embedded systems, and can't afford the few extra bytes for the...
January 30th, 2014, 05:36 AM
I fixed it. No exceptions, and output is correct.
I forgot to declare GetArgNum() as virtual, so Trainer's ctor was calling Functor's instead of Plane's.
January 30th, 2014, 04:24 AM
The TrainingData vector in Trainer seems to be one longer than it should be. The exception is coming from Plane's function call operator.
January 30th, 2014, 03:15 AM
My perceptron's train function seems to materialize my BadInput exception object out of nowhere. Yet, everything works fine.
And when I put an forever loop in main to validate the output with...
January 29th, 2014, 11:54 PM
January 29th, 2014, 11:26 PM
template <typename T>
January 29th, 2014, 11:13 PM
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.