手机版
热门标签
站点地图
我要投稿
广告合作
联系我们
搜 索
广告位招租
广告位招租
切换导航
首页
编程教程
编程导航
编程百科
编程问答
编程博文
编程实例
硬件设备
网络运营
软件教程
移动数码
办公软件
操作系统
人工智能
栏目导航
▸ 编程语言
▸ 前端开发
▸ 移动开发
▸ 开发工具
▸ 程序设计
▸ 行业应用
▸ CMS系统
▸ 服务器
▸ 数据库
公众号推荐
微信公众号搜
"智元新知"
关注
微信扫一扫可直接关注哦!
子栏目导航
php实例代码
Javascript实例代码
python实例代码
Shell实例代码
Sql实例代码
正则表达式实例代码
Python函数
Java实例代码
C#实例代码
C语言实例代码
C++实例代码
Erlang实例代码
Dart实例代码
D3.js实例代码
D语言实例代码
CSS实例代码
Cobol实例代码
Clojure实例代码
Bootstrap实例代码
Vue实例代码
Angular实例代码
汇编语言实例
编程之家
D语言实例代码
D语言访问结构体成员
import std.stdio; struct Books { char [] title; char [] author; char [] subject; intbook_id; }; void main( ) {
作者:编程之家 时间:2022-07-04
D语言TypeTuple
import std.stdio; import std.typecons; import std.typetuple; alias TypeTuple!(int, long) TL; void method1(int a, string b, float c, char d) {
作者:编程之家 时间:2022-07-04
D语言扩展属性和函数参数
import std.stdio; import std.typecons; void method1(int a, string b, float c, char d) { writeln("method 1 ",a,"\\t",b,"\\t",c,"\\t",d);
作者:编程之家 时间:2022-07-04
D语言使用元组模板的元组
import std.stdio; import std.typecons; void main() { auto myTuple = Tuple!(int, "id",string, "value")(1, "Tuts");
作者:编程之家 时间:2022-07-04
D语言使用元组的元组
import std.stdio; import std.typecons; void main() { auto myTuple = tuple(1, "Tuts"); writeln(myTuple);
作者:编程之家 时间:2022-07-04
D语言将指针传递给函数
import std.stdio; void main () { // an int array with 5 elements. int balance[5] = [1000, 2, 3, 17, 50];
作者:编程之家 时间:2022-07-04
D语言指向数组的指针
import std.stdio; void main () { // an array with 5 elements. double balance[5] = [1000.0, 2.0, 3.4, 17.0, 50.0];
作者:编程之家 时间:2022-07-04
D语言从函数返回指针
import std.stdio; void main () { int *p = getNumber(); for ( int i = 0; i < 10; i++ ) { writeln("*(p + " , i , ") : ",*(p + i));
作者:编程之家 时间:2022-07-04
D语言指向指针的指针
import std.stdio; const int MAX = 3; void main () { int var = 3000; writeln("Value of var :" , var);
作者:编程之家 时间:2022-07-04
D语言递增指针
import std.stdio; const int MAX = 3; void main () { int var[MAX] = [10, 100, 200]; int *ptr = &var[0];
作者:编程之家 时间:2022-07-04
D语言NULL指针
import std.stdio; void main () { int*ptr = null; writeln("The value of ptr is " , ptr) ; }
作者:编程之家 时间:2022-07-04
D语言使用指针
import std.stdio; void main () { int var = 20;// actual variable declaration. int *ip;// pointer variable
作者:编程之家 时间:2022-07-04
D语言指针
import std.stdio; void main () { int var1; writeln("Address of var1 variable: ",&var1); char var2[10];
作者:编程之家 时间:2022-07-04
D语言类模板
import std.stdio; import std.string; class Stack(T) { private: T[] elements; public: void push(T element) {
作者:编程之家 时间:2022-07-04
D语言具有多个类型参数的函数模板
import std.stdio; void print(T1, T2)(T1 value1, T2 value2) { writefln(" %s %s", value1, value2);
作者:编程之家 时间:2022-07-04
D语言函数模板
import std.stdio; void print(T)(T value) { writefln("%s", value); } void main() { print(42);
作者:编程之家 时间:2022-07-04
D语言混入名称空间
import std.stdio; template Person() { string name; void print() { writeln(name); } } void main() { string name;
作者:编程之家 时间:2022-07-04
D语言模板混入
import std.stdio; template Department(T, size_t count) { T[count] names; void setName(size_t index, T name) {
作者:编程之家 时间:2022-07-04
D语言字符串混入实例
import std.stdio; string print(string s) { return `writeln("` ~ s ~ `");`; } void main() { mixin (print("str1"));
作者:编程之家 时间:2022-07-04
D语言this别名
import std.stdio; struct Rectangle { long length; long breadth; double value() const @property { return cast(double) length * breadth;
作者:编程之家 时间:2022-07-04
D语言类变量的别名
import std.stdio; class Shape { int area; } class Square : Shape { string name() const @property { return "Square";
作者:编程之家 时间:2022-07-04
D语言数据类型的别名
import std.stdio; alias int myAppNumber; alias string myAppString; void main() { myAppNumber i = 10; myAppString s = "TestString";
作者:编程之家 时间:2022-07-04
D语言元组的别名
import std.stdio; import std.typetuple; alias TypeTuple!(int, long) TL; void method1(TL tl) { writeln(tl[0],"\\t", tl[1] );
作者:编程之家 时间:2022-07-04
D语言别名
import std.stdio; import std.conv:to; alias to!(string) toString; void main() { int a = 10; string s = "Test"~toString(a);
作者:编程之家 时间:2022-07-04
D语言输出范围
import std.algorithm; import std.stdio; struct MultiFile { string delimiter; File[] files; this(string delimiter, string[] fileNames ...) {
作者:编程之家 时间:2022-07-04
D语言有限随机访问范围
mport std.array; import std.stdio; import std.string; import std.range; import std.algorithm; struct FibonacciSeries {
作者:编程之家 时间:2022-07-04
D语言无限随机访问范围
import std.array; import std.stdio; import std.string; import std.range; import std.algorithm; class SquaresRange {
作者:编程之家 时间:2022-07-04
D语言双向范围
import std.array; import std.stdio; import std.string; struct Reversed { int[] range; this(int[] range) {
作者:编程之家 时间:2022-07-04
D语言前进范围
import std.array; import std.stdio; import std.string; import std.range; struct FibonacciSeries { int first = 0;
作者:编程之家 时间:2022-07-04
D语言输入范围
import std.stdio; import std.string; struct Student { string name; int number; string toString() const {
作者:编程之家 时间:2022-07-04
上一页
1
2
3
4
5
下一页
小编推荐
热门标签
更多
python
JavaScript
java
HTML
reactjs
C#
Android
CSS
Node.js
sql
r
python-3.x
MysqL
jQuery
c++
pandas
Flutter
angular
IOS
django
linux
swift
typescript
路由器
JSON
路由器设置
无线路由器
h3c
华三
华三路由器设置
华三路由器
电脑软件教程
arrays
docker
软件图文教程
C
vue.js
laravel
spring-boot
react-native