Vote count: 0 #include "std_lib_facilities" class Token { public: char kind; // what kind of token double value; // for numbers: a value Token(char ch) // make a Token from a char :kind(ch), value(0) { } Token(char ch, double val) // make a Token from a char and a double :kind(ch), value(val) { } }; class Token_stream { public: Token_stream(); Token get(); void putback(Token t); private: bool full; Token buffer; } ; Token_stream::Token_stream() :full(false),buffer(0) { } void Token_stream::putback(Token t) { if(full) error ("putback() into a full buffer"); buffer=t; full=true; } Token Token_stream::get() { if(full){ full=false; retu buffer; } char ch; cin >> ch; switch (ch) { case 'q': case ...
ادامه مطلبVote count: -1 I have 2 questions that I would like to get helped with. First question is: If you have 4 bits, how many unique numbers can you write? Second question is: If you have 4 bits, what is the largest number you can write. Answer with the base 10 Appreciate any help! asked 1 min agoJ. Doe Let's block ads! بخوانید...
ادامه مطلب