User Tools

Site Tools


cpp:stl:container_common_functions

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:stl:container_common_functions [2023/05/29 16:03] – [Β. Ένθεση σε set, unordered set] gthanoscpp:stl:container_common_functions [2023/05/29 16:13] – [A. Ένθεση στους sequence_containers list, forward_list, vector και dequeue] gthanos
Line 39: Line 39:
  
 </code> </code>
 +
 +<WRAP tip 80% center round>
 +Η διαφορά ανάμεσα στις μεθόδους //insert// και //emplace// είναι η εξής: 
 +  * Στη μέθοδο //insert// παρέχουμε ένα αντικείμενο και η μέθοδος κατασκευάζει ένα αντίγραφο του μέσω του κατασκευαστή αντιγραφέα (copy-constructor) της κλάσης //Student//.
 +  * Στη μέθοδο //empace// παρέχουμε τα ορίσματα μέσω των οποίων κατασκευάζεται ένα αντικείμενο τύπου Student, μέσω του κατασκευαστή ''Student(const char *name, int aem);''.
 +</WRAP>
  
 ==== Β. Ένθεση σε set, unordered set ==== ==== Β. Ένθεση σε set, unordered set ====
cpp/stl/container_common_functions.txt · Last modified: 2023/05/30 19:18 by gthanos