hello-incl.cc
来自「无限传感器网络的模拟环境」· CC 代码 · 共 33 行
CC
33 行
#include <stdio.h>#include "hello-incl.h"template <class T> component driver{public: outport void out(T t); void run(T t);};template <class T>void driver<T>::run(T t){ out(t);}component system{public: driver<const char*> d; print_string s; system() { connect d.out, s.in; }};int main(){ system s; s.d.run("hello world!\n"); return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?