Sign in

gwj / po_oopc · Files

GitLab

  • Go to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • po_oopc
  • examples07
  • 01-operator
  • koenig.cpp
  • Moved qt tutorial earlier
    13660600
    Grzegorz Jabłoński authored
    2022-09-19 14:43:21 +0200  
    Browse Dir »
koenig.cpp 367 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include <iostream>
#include <string>

namespace Chrono {
class Date { /* ... */
};
bool operator==(const Date&, const std::string&);
std::string format(const Date&); // make string representation
// ...
} // namespace Chrono

void f(Chrono::Date d, std::string s)
{
    if (d == s) {
        // ...
    }
    else if (d == "August 4, 1914") {
        // ...
    }
}