⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 state.cpp

📁 一个简单使用的控制器
💻 CPP
字号:
#include <iostream>#include "State.h"State::State(vector<int> vars) {   m_vars = vars;}int State::getVar(int index) const{   return m_vars[index];}void State::print() const{   cout << "State: ( ";   for (int i=0; i<(int) m_vars.size(); i++)      cout << m_vars[i] << " ";   cout << ")" << endl;}void State::print(string &str) const{   str += "State: ( ";   for (int i=0; i<(int) m_vars.size(); i++){      char num[100];      if (i==(int)m_vars.size()-1)         sprintf(num,"%d",m_vars[i]);       else         sprintf(num,"%d, ",m_vars[i]);       str += num;   }   str +=  " )\n";}/********************************************************************* * (C) Copyright 2006 Albert Ludwigs University Freiburg *     Institute of Computer Science * * All rights reserved. Use of this software is permitted for * non-commercial research purposes, and it may be copied only * for that use. All copies must include this copyright message. * This software is made available AS IS, and neither the authors * nor the Albert Ludwigs University Freiburg make any warranty * about the software or its performance. *********************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -