User Tools

Site Tools


cpp:copy_constructors

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
cpp:copy_constructors [2020/04/08 14:51] – [Μια πιο σύνθετη περίπτωση] gthanoscpp:copy_constructors [2020/04/12 16:02] gthanos
Line 6: Line 6:
 #include <iostream> #include <iostream>
 using namespace std; using namespace std;
-#include "Rectangle.cpp"+#include "Rectangle.hpp"
  
 void printArea(const Rectangle r) { void printArea(const Rectangle r) {
Line 97: Line 97:
  
 <code cpp CopyRectangle.cpp> <code cpp CopyRectangle.cpp>
-#include "Rectangle.cpp"+#include "Rectangle.hpp"
  
 int main() { int main() {
Line 108: Line 108:
 Το παραπάνω είναι λειτουργικά ισοδύναμο με το παρακάτω. Το παραπάνω είναι λειτουργικά ισοδύναμο με το παρακάτω.
 <code cpp CopyRectangle.cpp> <code cpp CopyRectangle.cpp>
-#include "Rectangle.cpp"+#include "Rectangle.hpp"
  
 int main() { int main() {
cpp/copy_constructors.txt · Last modified: 2022/05/12 19:41 by gthanos