Guest User

Untitled

a guest
Jun 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. s = listBox1->Items[i];
  2.  
  3. for (int i = 0; i < listBox1->Items->Count; i++) {
  4. string s;
  5. int a, b;
  6. s = listBox1->Items[i];
  7. a = stoi(s.substr(0, s.find('/')));
  8. b = stoi(s.erase(0, s.find('/') + 1));
  9. label1->Text += a/b;
  10. }
  11.  
  12. String^ s = listBox1->Items[i]->ToString();
  13. array<String^>^ splitted = s->Split('/');
  14. int a = Int32::Parse(splitted[0]);
  15. int b = Int32::Parse(splitted[1]);
  16. label1->Text += (a/b).ToString();
  17.  
  18. auto ms = listBox1->Items[i]->ToString();
  19.  
  20. #include <msclrmarshal_cppstd.h>
  21. ...
  22. s = msclr::interop::marshal_as<std::string>(ms);
Add Comment
Please, Sign In to add comment