Tutorial 9 HW, making Poo/Dude class, error "attempting to reference a deleted function"
Tutorial 9 HW, making Poo/Dude class, error "attempting to reference a deleted function"
I cannot for the life of me, after much googling and fiddling around, figure out what the hell this means or how to fix it. The line number the error gives is just a single open curly brace, with no Poo on either side. I thought this was gonna be so easy but what the heck
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Tutorial 9 HW, making Poo/Dude class, error "attempting to reference a deleted function"
That error message means that you are attempting to access a function that isn't available. For instance, Poo() or Dude() for default constructors. Poo(const Poo&) or Dude( const Dude& )for copy constructors or Poo& operator=( const Poo& ) or Dude& operator=( const Dude& ) for copy assignment operators.
Possible causes for this is you have a member in Poo or Dude that doesn't have a default constructor or copy assignment operator that is either explicitly or implicitly defined. You are trying to make a default Poo/Dude object when no default constructor is defined. You are trying to pass a Dude/Poo object by value to a function when a copy assignment operator isn't defined or a member of Poo/Dude has their copy assignment operator deleted.
If this doesn't help, share the code and we'll be able to take a look at it and be more precise.
Possible causes for this is you have a member in Poo or Dude that doesn't have a default constructor or copy assignment operator that is either explicitly or implicitly defined. You are trying to make a default Poo/Dude object when no default constructor is defined. You are trying to pass a Dude/Poo object by value to a function when a copy assignment operator isn't defined or a member of Poo/Dude has their copy assignment operator deleted.
If this doesn't help, share the code and we'll be able to take a look at it and be more precise.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com