export all events for this room

Starred posts

Nov 1, 2020 07:49
// List the stack contents
else if (s=="list"){
  // The only way to list the contents of the stack is to make a
  // copy of it then pop all the elements off the copy
  stack<double> stkcopy = stk;
  if (stkcopy.empty()) {
    cout << "Stack is empty" << endl;
  } else {
    cout << "Stack size = " << stkcopy.size() << endl;
    while (!stkcopy.empty()) {
      cout << stkcopy.top() << endl;
      stkcopy.pop();
    }
  }
}
Oct 31, 2020 11:12
#include <iostream>
#include <string>

using namespace std;

int main(){
  string s;
  double d;
  bool is_number;

  while (true)
  {
    cin>>s;

    // See if the string is numeric
    try {
      d = std::stod(s);
      is_number = true;
    }
    catch (const std::exception& e) {
      is_number = false;
    }

    if (is_number) {
      cout << "Got number: " << d << endl;
    }
    else if(s=="+"){
      cout<<"add"<<endl;
    }
    else if(s=="-"){
      cout<<"subtract"<<endl;
    }
    else if(s=="/"){
Oct 29, 2020 10:41
Oct 29, 2020 10:39
But I'm not sure how you tell whether it is installed or not ...
Oct 29, 2020 10:38
This is the Intel Optane module. It is a 256GB module so it may well be what Lenovo mean by 1TB HDD + 256GB SSD.
Oct 29, 2020 05:58
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
  for (int i = 0; i < argc; i++)
    cout << argv[i] << endl;

  return 0;
}