Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Tominator2011

Tominator2011 Tominator20​05

Niner since 2005

A fellow student programmer from Sheffield,UK.Finished studying HND Computing in 2005.
  • Stephan T. Lavavej - Core C++, 8 of n

    I'm looking forward to the next lecture from STL, anyone know when it might be.
    Charles do you know?

  • Stephan T. Lavavej - Core C++, 7 of n

    Happy Christmas to you Stephen,
    Bring on more C++ videos.
    Keep up the good work, an excellent Christmas present from C9 team.
    Thanks again Big Smile

  • Stephan T. Lavavej - Core C++, 6 of n

    Hey STL,

    Any Idea when User Defined Literals will be implemented in VC2012, i'm looking forward to trying something like,

    int operator "" _MB (unsigned long long) {return 1024;}
    
    int main(void)
    {
       int mySize = 34_MB;
    
      printf("%d",mySize);
      return 0;
    }

    Tom

  • Stephan T. Lavavej - Core C++, 6 of n

    Hey STL, 

    I managed to write the Linked List using unique_ptrs finally, it was me who emailed you!
    Took me a fair while though.

    Here's my code.

    #include <memory>
    #include <utility>
    using namespace std;
    
    template <typename T>
    struct Node{
        T data;
        unique_ptr<Node<T>> next;
    public:
        Node(T val):data(val),next(nullptr){}
        Node(T val,unique_ptr<Node>&& next){
            this->next = move(next);
        }
        Node(T val,unique_ptr<Node>& next){
            this->data = val;
            this->next.swap(new Node<T>(next->data));
        }
        void insertAfter(T& data){
            next = unique_ptr<Node<T>>(new Node<T>(data,next));
        }
    
    };
    
    template <typename T>
    class SList{
    private:
        unique_ptr<Node<T>> head;
        int size;
    public:
        SList(){
            size = 0;
            head = nullptr;
        }
    
        void insertFront(T val){
                head = unique_ptr<Node<T>>(new Node<T>(val,head));
    
                size++;
        }
    
    };

    and the main program

    
    
    #include <iostream>
    #include "Node.h"
    using namespace std;
    int main(){
    
        SList<int> myList;
        int f = 3;
        int s = 4;
        myList.insertFront(f);
        myList.insertFront(s);
    
    
        return 0;
    }


    Keep up the good work Smiley
    Tom

  • Stephan T. Lavavej - Core C++, 6 of n

    I know, i saw them Smiley I meant an Advanced lecture on Linked Lists and Maps.
    How they work etc, but like I said Stephen, it doesn't matter anymore :->

  • Stephan T. Lavavej - Core C++, 6 of n

    Hi,

    One topic I'd like to see is see an Advanced Series on Data Structures.
    For Example, Linked Lists and Maps. 
    [edit] Forget that Smiley I can look up data structures on you tube Smiley

    As always a great series Smiley

    Keep up the good work

    Tom

  • Stephan T. Lavavej - Core C++, 5 of n

    Great Big Smile another C++ video from Stephen.

    Template Specialization,
    ive seen a factorial specialization like that.

     

    template <int N>
    struct Factorial {
        enum { value = N * Factorial<N - 1>::value };
    };
    
    template <>
    struct Factorial<0> {
        enum { value = 1 };
    };
    
    // Factorial<4>::value == 24
    // Factorial<0>::value == 1
    const int x = Factorial<4>::value; // == 24
    const int y = Factorial<0>::value; // == 1

    Cant wait for part 5, and a meta programming tutorial will be fantastic

  • Stephan T. Lavavej - Core C++, 4 of n

    Hi STL,

    I'm programming a directory iterator and I'm getting a error message, but not from my program, from the filesystem header; saying " '_Ptr' : is not a member of 'std::tr2::sys::basic_directory_entry<_Path>'.

    my call to path is

    sys::path fullpath = 
            sys::system_complete(sys::path(argv[1]));
    


    Thanks in advance for any assistance

    Tom

  • Stephan T. Lavavej - Core C++, 4 of n

    Great Video again!

    Charles, any idea when the next video will be uploaded? Smiley

  • Day 1 Keynote - Bjarne Stroustrup: C++11 Style

    Wow, i must be honoured to get a reply from the man himself.

    Thanks for the heads up Bjarne, C++ is really moving up.

    So I can just pass a object by value by using rvalue references.

    That is soo cool.

    Tom 

See more comments…