My portfolio - Resources

Anthony De Sousa

Video

Local video


Distant video

Code sample

                            #include<iostream>
                            int main()
                            {
                                cout<<"Hello world, I'm Anthony !"<<endl;
                                cout<<"Enter an integer"<<endl;
                                int x;
                                cin>>x;
                                if (x<0)
                                {
                                    x=-x;
                                }
                                cout<<"The absolute value of your number is "<<x<<endl;
                                return 0;
                            }

                            struct my_promise_type
                            {
                                void* operator new(std::size_t size)
                                {
                                    void* ptr = my_custom_allocate(size);
                                    if (!ptr) throw std::bad_alloc{};
                                    return ptr;
                                }

                                void operator delete(void* ptr, std::size_t size)
                                {
                                    my_custom_free(ptr, size);
                                }
                            };