Home

中序转逆波兰式

遇到(,直接压栈 遇到),输出栈中所有元素直到遇到( 遇到运算符 如果优先级比栈顶的大则入栈 否则持续输出栈顶 遇到数字,直接输出 输出栈内所有元素 /* 12*(3+4)-6+8/2 */ void caculate(const char * str){ my_stack<char> s; int i=0; char ch; char* output = new char[1024]; int j=0; while(*(str + i) != '\0'){ ch = *(str+i); if(ch=='+' || ch=='-' || ch=='*' || ch=='/' || c...

Read more

NFS搭建

server vim /etc/exports /var/lib/docker/volumes hostname(rw,async,insecure,anonuid=1000,anongid=1000,no_root_squash) systemctl enable rpcbind systemctl start rpcbind systemctl enable nfs-server systemctl start nfs-server client vim /etc/fstab 175.24.130.223:/var/lib/docker/volumes /var/lib/docker/volumes nfs defaluts 0 0 mount -a

Read more