fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <boost/algorithm/string.hpp>
  4.  
  5. using namespace std;
  6.  
  7. struct sNssaiWithDnn
  8. {
  9. std::string sliceServiceType;
  10. std::string sliceDifferentiator;
  11. uint8_t sliceServiceTypeUint8;
  12. std::vector<std::string> dnn;
  13.  
  14. sNssaiWithDnn() : sliceServiceType(""), sliceDifferentiator(""), sliceServiceTypeUint8(0)
  15. {
  16. }
  17.  
  18. bool compare(const sNssaiWithDnn& snssai) const
  19. {
  20. if (snssai.sliceServiceType.compare(sliceServiceType) != 0)
  21. return false;
  22. else if (snssai.sliceDifferentiator.compare(sliceDifferentiator) != 0)
  23. return false;
  24. else if (snssai.sliceServiceTypeUint8 != sliceServiceTypeUint8)
  25. return false;
  26. else if (!(boost::iequals(snssai.dnn,dnn)))
  27. return false;
  28. return true;
  29. }
  30. };
  31.  
  32. int main() {
  33.  
  34. std::vector<std::string> dnn1;
  35. std::vector<std::string> dnn2;
  36.  
  37. if (!(boost::iequals(dnn1,dnn2)))
  38. {
  39. cout << "Error" << endl;
  40. }
  41.  
  42. // your code goes here
  43. return 0;
  44. }
Success #stdin #stdout 0.01s 5464KB
stdin
Standard input is empty
stdout
Standard output is empty