fork download
  1. #include <vector>
  2. #include <iostream>
  3.  
  4. struct StdCardConfirmationReceipt {
  5. private:
  6. std::string sOfrIdOrderCentral;
  7. public:
  8. StdCardConfirmationReceipt() : sOfrIdOrderCentral() {}
  9. StdCardConfirmationReceipt(std::string s) : sOfrIdOrderCentral(s) {}
  10. public:
  11. const std::string& getsOfrIdOrderCentral() const { return sOfrIdOrderCentral; }
  12. };
  13.  
  14. int main() {
  15. std::vector<StdCardConfirmationReceipt> vec;
  16. vec.push_back(StdCardConfirmationReceipt("1"));
  17. vec.push_back(StdCardConfirmationReceipt("2"));
  18. vec.push_back(StdCardConfirmationReceipt("3"));
  19. for (auto vIter = vec.begin(); vIter != vec.end(); ++vIter) {
  20. std::cout << vIter->getsOfrIdOrderCentral();
  21. }
  22. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
123