fork download
  1. #include <cstdlib>
  2. #include <cstdio>
  3. using namespace std;
  4.  
  5. struct str
  6. {
  7. char p1[3];
  8. char p2[3];
  9. char p3[5];
  10.  
  11. char* wyswietl()
  12. {
  13. char buf[12];
  14. sprintf(buf, "%s-%s-%s\n", p1, p2, p3);
  15. return buf;
  16. }
  17. };
  18.  
  19. int main()
  20. {
  21. str s = {"00", "00", "0000"};
  22. printf("%s", s.wyswietl());
  23. return 0;
  24. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
00-00-0000