Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: TSLexi

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Re: Not sure why values are changing when I'm passing arrays and array sizes

    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
  2. Replies
    18
    Views
    1,242

    Re: Homework help: is this a good design?

    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...
  3. Replies
    18
    Views
    1,242

    Re: Homework help: is this a good design?

    OK, here's the final version (I modified the move ctor so it just switches the pointers around):

    Employee.hpp


    //inclusion guards
    #ifndef EMPLOYEE_HPP
    #define EMPLOYEE_HPP

    //including...
  4. Replies
    18
    Views
    1,242

    Re: Homework help: is this a good design?

    Also, should my functions pass arguments by value, by const lvalue ref, or by rvalue ref?
  5. Replies
    18
    Views
    1,242

    Re: Homework help: is this a good design?

    He told us we'll be inheriting from Employee in later assignments.
  6. Replies
    18
    Views
    1,242

    Homework help: is this a good design?

    Hi guys,

    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...
  7. Re: How on earth does this require 3.1GiB of RAM?!?

    I'm writing and running this on my Samsung S4.
  8. Re: Why is the CRTP used instead of virtual functions?

    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.
  9. Re: Why is the CRTP used instead of virtual functions?

    class Functor
    {
    public:
    Functor();
    Functor(const Functor & rhs) = default;
    virtual ~Functor() =default;
    virtual float operator() (const FloatV & input) const =0;
    virtual int...
  10. Re: Why is the CRTP used instead of virtual functions?

    Why won't the committee require compilers to implement devirtualization in order to be compliant?
  11. Re: Why is the CRTP used instead of virtual functions?

    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....
  12. Re: Why is the CRTP used instead of virtual functions?

    https://www.thc.org/root/phun/unmaintain.html
  13. Re: Why is the CRTP used instead of virtual functions?

    If your design method is completely based on a compiler flaw, you shouldn't be programming. It's a recipe for unmaintainable code
  14. Re: Why is the CRTP used instead of virtual functions?

    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...
  15. Re: Why is the CRTP used instead of virtual functions?

    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...
  16. Re: How on earth does this require 3.1GiB of RAM?!?

    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...
  17. How on earth does this require 3.1GiB of RAM?!?

    Apparently GCC requires 3.1GiB of RAM to compile this simple program...



    #include <iostream>
    #include <future>
    using std::cout;
    using std::endl;
    using std::future;
    using std::async;
  18. Replies
    2
    Views
    308

    Advice on implementing my ANN class

    Hi guys,

    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...
  19. Why is the CRTP used instead of virtual functions?

    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...
  20. Re: Exception seems to materialize out of nowhere!

    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.
  21. Re: Exception seems to materialize out of nowhere!

    The TrainingData vector in Trainer seems to be one longer than it should be. The exception is coming from Plane's function call operator.
  22. Exception seems to materialize out of nowhere!

    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...
  23. Replies
    10
    Views
    449

    Re: Why can't I have an ADT as a member?

    fixed it.
  24. Replies
    10
    Views
    449

    Re: Why can't I have an ADT as a member?

    Functor.hpp


    #ifndef FUNCTOR_HPP
    #define FUNCTOR_HPP
    #include "Typedefs.hpp"

    template <typename T>
    class Functor
    {
  25. Replies
    10
    Views
    449

    Re: Why can't I have an ADT as a member?

    Even then...
Results 1 to 25 of 75
Page 1 of 3 1 2 3


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center