Skip to content
Snippets Groups Projects
Commit 2feb7340 authored by Alexander Steinmaurer's avatar Alexander Steinmaurer
Browse files

7 VO Einheit

parent 0bf2d8be
Branches
No related tags found
No related merge requests found
Showing
with 17 additions and 16 deletions
......@@ -8,7 +8,7 @@ struct SuperHero {
{
std::cout << name_ << " wurde erzeugt" << std::endl;
};
~SuperHero()
{
std::cout << name_ << " wurde zerstört" << std::endl;
......
#include <iostream>
#include <string>
#include <memory>
struct SuperHero {
std::string name_;
SuperHero(std::string name) : name_(name)
......
......@@ -8,7 +8,7 @@ struct SuperHero {
{
std::cout << name_ << " wurde erzeugt" << std::endl;
};
~SuperHero()
{
std::cout << name_ << " wurde zerstört" << std::endl;
......
#include <iostream>
#include <string>
#include <memory>
struct SuperHero {
public:
SuperHero(std::string name, std::string phrase) : name_(name),
......
#include <iostream>
#include <string>
#include <memory>
struct SuperHero {
public:
SuperHero(std::string name) : name_(name)
{
std::cout << name_ << " wurde erzeugt" << std::endl;
};
~SuperHero()
{
std::cout << name_ << " wurde zerstört" << std::endl;
......
#include <iostream>
#include <string>
#include <memory>
struct SuperHero {
public:
SuperHero(std::string name) : name_(name)
......
#include <iostream>
#include <string>
#include <memory>
struct SuperHero {
public:
SuperHero(std::string name) : name_(name) { };
......
#include <iostream>
#include <string>
#include <memory>
struct SuperHero {
public:
SuperHero(std::string name) : name_(name) { };
......
#include <iostream>
#include <string>
#include <memory>
struct SuperHero {
std::string name_;
SuperHero(std::string name) : name_(name)
......
......@@ -8,7 +8,7 @@ struct SuperHero {
{
std::cout << name_ << " wurde erzeugt" << std::endl;
};
~SuperHero()
{
std::cout << name_ << " wurde zerstört" << std::endl;
......
......@@ -8,7 +8,7 @@ struct SuperHero {
{
std::cout << name_ << " wurde erzeugt" << std::endl;
};
~SuperHero()
{
std::cout << name_ << " wurde zerstört" << std::endl;
......
......@@ -7,7 +7,7 @@ struct SuperHero {
SuperHero(std::string name) : name_(name) { };
~SuperHero() { };
std::weak_ptr<SuperHero> enemie_;
private:
std::string name_;
};
......
......@@ -7,7 +7,7 @@ double division(int var1, int var2)
}
return (var1 / var2);
}
int main()
{
int a = 30;
......
......@@ -12,3 +12,4 @@ int main()
std::cout << ex.what() << std::endl;
}
}
\ No newline at end of file
......@@ -11,4 +11,4 @@ int main()
} catch (std::exception &ex) {
std::cout << "exception " << ex.what() << std::endl;
}
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -9,7 +9,7 @@ class MyException : public std::exception
return "Ich schmeiße mit Exceptions um mich!";
}
};
int main()
{
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment