Skip to main content
Fixed an error
Source Link
R Sahu
  • 3.6k
  • 13
  • 20

Make SingleLinkedList.h self-sufficient

The file can be made self-sufficient by #includeing the following header files:

  1. <memory> for std::unique_ptr and std::make_unique.
  2. <algorithm> for std::find.
  3. <utility> for std::move.
  4. <stdexcept> for std::out_of_range and std::invalid_argument.
  5. <string> for constructing std::string objects used when constructing instances of std::out_of_range and std::invalid_argument.
  6. <iterator> for std::forward_iterator_tag.
  7. <cstddef> for std::ptrdiff_t.

One trick to detect such issues is to make it the first #include file in main.cpp.

Make SingleLinkedList.h self-sufficient

The file can be made self-sufficient by #includeing the following header files:

  1. <memory> for std::unique_ptr and std::make_unique.
  2. <algorithm> for std::find.
  3. <utility> for std::move.
  4. <stdexcept> for std::out_of_range and std::invalid_argument.
  5. <string> for constructing std::string objects used when constructing instances of std::out_of_range and std::invalid_argument.
  6. <iterator> for std::forward_iterator_tag.
  7. <cstddef> for std::ptrdiff_t.

One trick to detect such issues is to make it the first #include file in main.cpp.

Make SingleLinkedList.h self-sufficient

The file can be made self-sufficient by #includeing the following header files:

  1. <memory> for std::unique_ptr and std::make_unique.
  2. <algorithm> for std::find.
  3. <utility> for std::move.
  4. <stdexcept> for std::out_of_range and std::invalid_argument.
  5. <iterator> for std::forward_iterator_tag.
  6. <cstddef> for std::ptrdiff_t.

One trick to detect such issues is to make it the first #include file in main.cpp.

Source Link
R Sahu
  • 3.6k
  • 13
  • 20

Make SingleLinkedList.h self-sufficient

The file can be made self-sufficient by #includeing the following header files:

  1. <memory> for std::unique_ptr and std::make_unique.
  2. <algorithm> for std::find.
  3. <utility> for std::move.
  4. <stdexcept> for std::out_of_range and std::invalid_argument.
  5. <string> for constructing std::string objects used when constructing instances of std::out_of_range and std::invalid_argument.
  6. <iterator> for std::forward_iterator_tag.
  7. <cstddef> for std::ptrdiff_t.

One trick to detect such issues is to make it the first #include file in main.cpp.