Guest User

Untitled

a guest
Feb 3rd, 2015
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. struct JakasStruktura{
  2.     int a;
  3.     QString b;
  4. }
  5.  
  6. QList<JakasStruktura> listaStruktur;
  7.  
  8. for(int i = 0; i<10; ++i)
  9. {
  10.     JakasStruktura *temp = new JakasStruktura; \\a może zamiast tego zrobić  std::shared_ptr<JakasStruktura> ?
  11.     temp->a = i;
  12.     temp->b = "Tekst";
  13.     listaStruktur.append(temp);
  14.     //czy to tu powinno być?
  15.     delete temp;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment