User Tools

Site Tools


cpp:class_templates_specialization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cpp:class_templates_specialization [2021/06/04 17:44] gthanoscpp:class_templates_specialization [2022/05/26 10:47] (current) – [Εξειδίκευση της κλάσης Box στην περίπτωση που η παράμετρος είναι δείκτης σε χαρακτήρα] gthanos
Line 8: Line 8:
 #ifndef _BOXTPTR_HPP_ #ifndef _BOXTPTR_HPP_
 #define _BOXTPTR_HPP_ #define _BOXTPTR_HPP_
 +
 #include "Box.hpp" #include "Box.hpp"
 +
 template<typename T> template<typename T>
 class Box<T*> { class Box<T*> {
Line 121: Line 123:
 #ifndef _BOXCHARPTR_HPP_ #ifndef _BOXCHARPTR_HPP_
 #define _BOXCHARPTR_HPP_ #define _BOXCHARPTR_HPP_
 +
 +#include "Box.hpp"
 +#include <cstring>
 +
 template <> template <>
 class Box<char *> { class Box<char *> {
Line 181: Line 187:
 <code cpp BoxCharPtrUsage.cpp> <code cpp BoxCharPtrUsage.cpp>
 #include <iostream> #include <iostream>
-#include "Box.hpp" + 
-#include "Student.hpp"+#include "BoxCharPtr.hpp"
  
 using namespace std; using namespace std;
cpp/class_templates_specialization.1622828656.txt.gz · Last modified: 2021/06/04 16:44 (external edit)