Advertisement
Guest User

Untitled

a guest
May 24th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include <regex>
  5.  
  6. using namespace std;
  7.  
  8. int main(int argc, char** argv) {
  9. string komenda;
  10. vector <string> funkcje;
  11. int at_at;
  12. cin >> komenda;
  13. regex test ("[(log|sin|cos|exp)@]*");
  14. cout << regex_match(komenda, regex("[(log|sin|cos|exp)@]*"));
  15. do {
  16. at_at = komenda.find("@");
  17. funkcje.push_back(komenda.substr(0, at_at));
  18. komenda = komenda.substr(at_at + 1, komenda.length());
  19. //cout << komenda;
  20. } while (at_at!=std::string::npos);
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement