Skip to content
Snippets Groups Projects
Commit 1582ddda authored by Marek Štrympl's avatar Marek Štrympl
Browse files

update

parent df1dd87d
No related branches found
No related tags found
No related merge requests found
*.exe
*.out
*.o
tasks.json
\ No newline at end of file
*.json
\ No newline at end of file
No preview for this file type
......@@ -4,6 +4,17 @@ class myClass
{
public:
int value;
myClass() {
value = 10;
std::cout << "Created\n";
}
myClass(int val) {
value = val;
std::cout << "Created\n";
}
~myClass() {
std::cout << "Destroyed\n";
}
};
int main()
......@@ -11,10 +22,10 @@ int main()
int Marek = 0;
myClass a;
a.value = 5;
std::cout << a.value << std::endl;
myClass *c = new myClass(5);
delete c;
return Marek;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment