playing around.
This commit is contained in:
62
src/main.cpp
62
src/main.cpp
@@ -211,29 +211,36 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
class Interface
|
||||
{
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
// hat am wenigsten darstellungfehler (alternative: fusion)
|
||||
QQuickStyle::setStyle("Imagine");
|
||||
virtual int moo() = 0;
|
||||
|
||||
|
||||
XQMainWindow window;
|
||||
window.show();
|
||||
};
|
||||
|
||||
return app.exec();
|
||||
|
||||
}
|
||||
*/
|
||||
class Aspect
|
||||
{
|
||||
|
||||
virtual int moo()
|
||||
{
|
||||
qDebug() << " --- Aspect moo";
|
||||
return 42;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
class DoWork : public Interface, public Aspect
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int firz(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
||||
@@ -241,8 +248,10 @@ int main(int argc, char *argv[])
|
||||
QQuickStyle::setStyle("Imagine");
|
||||
|
||||
|
||||
|
||||
XQMainWindow window;
|
||||
|
||||
|
||||
// 1. Baum erstellen
|
||||
// Der Benutzer erstellt den Wurzelknoten direkt.
|
||||
Tree<std::string> root("Root");
|
||||
@@ -300,13 +309,16 @@ int main(int argc, char *argv[])
|
||||
if (found_it != root.cend()) {
|
||||
// *found_it gibt den Wert (std::string) zurück
|
||||
std::cout << "Gefunden: " << *found_it << std::endl;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Nicht gefunden." << std::endl;
|
||||
}
|
||||
|
||||
// 4. Verwendung mit <numeric> (z.B. std::count_if)
|
||||
std::cout << "\n--- STL std::count_if ---" << std::endl;
|
||||
int count = std::count_if(root.cbegin(), root.cend(), [](const std::string& val) {
|
||||
int count = std::count_if(root.cbegin(), root.cend(), [](const std::string& val)
|
||||
{
|
||||
return val.length() > 5; // Zähle alle Strings mit mehr als 5 Zeichen
|
||||
});
|
||||
|
||||
@@ -315,3 +327,21 @@ int main(int argc, char *argv[])
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
// hat am wenigsten darstellungfehler (alternative: fusion)
|
||||
QQuickStyle::setStyle("Imagine");
|
||||
|
||||
|
||||
XQMainWindow window;
|
||||
window.show();
|
||||
|
||||
return app.exec();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user