代码搜索结果
找到约 1,193 项符合
Q 的代码
q.m
function out=q(x)
out=0.5*erfc(x/sqrt(2));
问题集锦.txt
<mark>Q</mark>:是不是一个父类写了一个virtual函数,如果子类覆盖它的函数不加virtual,也能实现多态?
A:
virtual修饰符会被隐形继承的。virtual可加可不加,子类的空间里面有父类的所有变量(static除外),同一个函数只存在一个实体(inline除外),子类覆盖它的函数不加virtual,也能实现多态。
--------------------------------- ...
q.m
% File: q.m
% Software given here is to accompany the textbook: W.H. Tranter,
% K.S. Shanmugan, T.S. Rappaport, and K.S. Kosbar, Principles of
% Communication Systems Simulation with Wireless App
1142up.pas
{$Q-,$R-}
program tju1142;
var
num:array['A'..'Z']of byte;
used:array[0..25]of boolean;
pre,next:array[-1..26]of shortint;
s:array[1..3]of string;
n,i:byte;
found:boolean;
procedu