Advertisement
Guest User

Untitled

a guest
Sep 17th, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. //Andrew Beamer
  2. //Chea Cooley
  3. #include <iostream>
  4. #include <string>
  5. #include <vector>
  6. #include <algorithm>
  7. #include <cmath>
  8. using namespace std;
  9. inline void keep_window_open() { char ch; cin >> ch; }
  10.  
  11. int main()
  12. {
  13.     class Token{
  14.     public:
  15.         char kind;
  16.         double value;
  17.     };
  18.  
  19.     Token t1{ '+' };
  20.     Token t2{ '-' };
  21.     Token t3{ '*' };
  22.     Token t4{ '/' };
  23.     Token t5{ '(' };
  24.     Token t6{ ')' };
  25.  
  26.  
  27.     vector<Token>v = { t1, t2, t3, t4, t5, t6 };
  28.     vector<Token>input;
  29.     vector<Token>test = { 1, t1, 2 };
  30.  
  31.     for (int i = 0; i < test.size(); i++)
  32.     {
  33.         cout << test[i].kind << endl;
  34.     }
  35.  
  36.    
  37.  
  38.     keep_window_open();
  39.     return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement