C++提高--模板(类模板/函数模板)

news2024/9/20 8:12:10

模板的概念

函数模板(将类型参数化)

函数模板语法

两个函数逻辑非常相似

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
using namespace std;
// 模板

// 交换两个数
void swapInt(int& a, int& b)
{
	int temp = a;
	a = b;
	b = temp;
}
void swapDouble(double& a, double& b)
{
	double temp = a;
	a = b;
	b = temp;
}

// 可以发现,上面两个函数都是同样的逻辑,所以就要用到模板的概念
template<typename T>//声明一个模板,T是一个类型
void swapT(T& a, T& b)
{
	T temp = a;
	a = b;
	b = temp;
}
void test01()
{
	int a = 10;
	int b = 20;
	cout << "a = " << a << endl
		<< "b = " << b << endl;
	// 自动类型推到
	swapT(a, b);
	cout << "a = " << a << endl
		<< "b = " << b << endl;

	double c = 1.1;
	double d = 2.2;
	cout << "c = " << c << endl
		<< "d = " << d << endl;
	// 显示指定类型
	swapT<double>(c, d);
	cout << "c = " << c << endl
		<< "d = " << d << endl;
}
int main()
{
	test01();
	system("pause");
	return 0;
}

函数模板注意事项

总结: 使用时要先确定T,且确定的T是唯一的

函数模板案例

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
using namespace std;
template<typename T>
void sort(T* arr, int n)
{
	int i = 0;
	int j = 0;
	for (i = 0; i < n; i++)
	{
		int max = i;
		for (j = i + 1; j < n; j++)
		{
			if (arr[j] > arr[max])
			{
				max = j;
			}
		}
		if (max != i)
		{
			swap(arr[max], arr[i]);
		}
	}
}

template<typename T>
void swap(T& a, T& b)
{
	T temp = a;
	a = b;
	b = temp;
}


template<typename T>
void myPrint(T* arr, int n)
{
	for (int i = 0; i < n; i++)
	{
		cout << arr[i] << "  ";
	}
	cout << endl;
}

void test01()
{
	int arr[] = { 9,8,7,2,5,10 };
	sort(arr, sizeof(arr) / sizeof(arr[0]));
	myPrint(arr, sizeof(arr) / sizeof(arr[0]));
}

void test02()
{
	char arr[] = "snhfkbzy";
	sort(arr, sizeof(arr) / sizeof(arr[0]));
	myPrint(arr, sizeof(arr) / sizeof(arr[0]));
}


int main()
{
	test01();
	test02();
	system("pause");
	return 0;
}

普通函数和模板的区别

智能但不够只能,只能想到一层

普通函数与函数模板的调用规则

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
using namespace std;

void myPrint(int a,int b)
{
	cout << "普通函数的调用" << endl;
}

template<typename T>
void myPrint(T a, T b)
{
	cout << "函数模板的调用" << endl;
}

template<typename T>
void myPrint(T a, T b, T c)
{
	cout << "函数模板重载的调用" << endl;
}

void test01()
{
	// 如果函数模板和普通函数都可以实现,优先调用普通函数
	myPrint(10, 20);

	// 可以通过空模板参数列表强制调用函数模板
	myPrint<>(10, 20);

	// 函数模板可以发生重载
	myPrint(10, 20, 30);

	// 如果函数模板可以产生更好的匹配性,优先调用函数模板
	char c = 'a';
	char d = 'b';
	// 普通函数可以调用,因为可以类型转换
	// 但模板具有更好的匹配性
	myPrint(c, d);
}
int main()
{
	test01();
	system("pause");
	return 0;
}

模板的局限性

也就是公用的模板个别特殊处理

STL--标准模板库

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
#include<string>
using namespace std;

class Person
{
public:
	Person(string name, int age)
	{
		this->name = name;
		this->age = age;
	}
	string name;
	int age;
};


template<typename T>
bool myCompare(T a, T b)
{
	if (a == b)
	{
		return true;
	}
	else
	{
		return false;
	}
}

template<>bool myCompare(Person p1, Person p2)
{
	if (p1.name == p2.name && p1.age == p2.age)
	{
		return true;
	}
	else
	{
		return false;
	}
}


void test01()
{
	int a = 10;
	int b = 10;
	bool ret = myCompare(a, b);
	if (ret)
	{
		cout << "a == b" << endl;
	}
	else
	{
		cout << "a != b" << endl;
	}
}

void test02()
{
	Person p1("tom", 18);
	Person p2("tom", 18);
	// 自定义数据类型,系统无法比较,需要将模板特例化
	bool ret = myCompare(p1, p2);
	if (ret)
	{
		cout << "p1 == p2" << endl;
	}
	else
	{
		cout << "p1 != p2" << endl;
	}
}
int main()
{
	test01();
	test02();
	system("pause");
	return 0;
}

类模板

类模板的基本语法

// 类模板必须标出类型,系统不自动匹配

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
#include<string>
using namespace std;

template<class nameType,class ageType>
class Person
{
public:
	Person(nameType name, ageType age)
	{
		this->name = name;
		this->age = age;
	}
	nameType name;
	ageType age;
	void showMessage()
	{
		cout << "姓名:" << this->name << endl
			<< "年龄:" << this->age << endl;
	}
};

void test01()
{
	// 类模板必须标出类型,系统不自动匹配
	Person<string, int> p1("孙悟空", 999);
	p1.showMessage();
}

int main()
{
	test01();
	system("pause");
	return 0;
}

类模板与函数模板的区别

默认参数,有个默认参数定义时可以不写

// 默认参数必须定义最后几个位置,且是连续的,且必须包含最后一个位置
// 否则语法是通过的,但是在调用的时候默认的位置还是不能省略
template<class nameType = string,class ageType = int,class idType>

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
#include<string>
using namespace std;

// 默认参数必须定义最后几个位置,且是连续的,且必须包含最后一个位置
// 否则语法是通过的,但是在调用的时候默认的位置还是不能省略
template<class nameType = string,class ageType = int,class idType>
class Person
{
public:
	Person(nameType name, ageType age, idType id)
	{
		this->name = name;
		this->age = age;
		this->id = id;
	}

	nameType name;
	ageType age;
	idType id;

	void showMessage()
	{
		cout << "姓名:" << this->name << endl
			<< "年龄:" << this->age << endl
			<< "ID:" << this->id << endl;
	}
};

void test01()
{
	// 类模板必须标出类型,系统不自动匹配
	Person<string, int, int>p1("孙悟空", 999,123);
	p1.showMessage();
}

int main()
{
	test01();
	system("pause");
	return 0;
}

类模板中成员函数创建时机

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
using namespace std;

class Person1
{
public:
	void show1()
	{
		cout << "Person1函数调用" << endl;
	}
};

class Person2
{
public:
	void show2()
	{
		cout << "Person2函数调用" << endl;
	}
};

template<class T>
class Person
{
public:
	T obj;
	void func1()
	{
		obj.show1();
	}
	void func2()
	{
		obj.show2();
	}
};

void test01()
{
	Person<Person1> p;
	p.func1();
	// 编译时没出错是因为编译器也不知道T是什么类型
	// 只有调用的时候该函数才生成
	// 而T具有唯一性,故代码运行是出错
	//p.func2();
}

int main()
{
	test01();
	system("pause");
	return 0;
}

类模板对象做函数参数

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
#include<string>
using namespace std;
//类模板对象做函数参数
template<class T1,class T2>
class Person
{
public:
	Person(T1 name, T2 age)
	{
		this->name = name;
		this->age = age;
	}
	T1 name;
	T2 age;
	void show()
	{
		cout << "姓名:" << this->name << endl
			<< "年龄:" << this->age << endl;
	}
};

// 1.指定传入类型 --直接显示对象的数据类型
// 这种方法在开发时使用最多
void myPrint1(Person<string, int> p)
{
	p.show();
}
void test01()
{
	Person<string, int> p1("孙悟空", 100);
	myPrint1(p1);
}

// 2.参数模板化,将对象中的参数变为模板进行传递
template<class T1,class T2>
void myPrint2(Person<T1,T2> p)
{
	p.show();
	cout << "T1的类型为:" << typeid(T1).name() << endl
		<< "T2的类型为:" << typeid(T2).name() << endl;
}
void test02()
{
	Person<string, int> p2("猪八戒", 90);
	myPrint2(p2);
}

// 3. 将整个类模板化
template<class T>
void myPrint3(T p)
{
	p.show();
	cout << "T的类型为:" << typeid(T).name() << endl;
}
void test03()
{
	Person<string, int> p3("唐僧", 30);
	myPrint3(p3);
}
int main()
{
	//test01();
	//test02();
	test03();
	system("pause");
	return 0;
}

类模板与继承

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
using namespace std;

template<class T>
class Father
{
public:
	T name;
};
// 1.当子类继承父类模板的时候,子类在声明的时候,要指出父类中T的类型
// 否则他无法计算类的大小
//class Son :public Father

// 2.可以单独指出父类的T
// 这样子类就不用模板化
class Son :public Father<string>
{

};

// 3.如果想灵活指定父类中的T类型,子类也需要模板化
template<class T1, class T2>
class Son2 :public Father<T2>
{
public:
	Son2()
	{
		cout << "T1的类型为:" << typeid(T1).name() << endl;
		cout << "T2的类型为:" << typeid(T2).name() << endl;
	}
	T1 obj;
};

void test01()
{
	Son2<int, char> s2;
}
int main()
{
	test01();
	system("pause");
	return 0;
}

类模板成员函数类外实现

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
using namespace std;
template<class T1,class T2>
class Person
{
public:
	Person(T1 name, T2 age);
	T1 name;
	T2 age;
	void show();
};

template<class T1, class T2>
// Person<T1,T2>表明他是类模板内的函数
Person<T1, T2>::Person(T1 name, T2 age)
{
	this->name = name;
	this->age = age;
}

template<class T1, class T2>
void Person<T1, T2>::show()
{
	cout << "姓名:" << this->name << endl
		<< "年龄:" << this->age << endl;
}

void test01()
{
	Person<string, int> p("张三",20);
	p.show();
}
int main()
{
	test01();
	system("pause");
	return 0;
}

类模板分文件编写

类模板分文件编写.cpp

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
using namespace std;

// 出错的原因是类模板的成员函数只有在调用是才能生成
// 在编译的时候没生成这些成员函数,所以在链接的时候找不到这些成员函数
// 所以说在编译的时候编译器只走了Person.h这个文件
// 并没有看Person.cpp 中的函数
//#include"Person.h"

// 1.第一种解决方法
// 因为Person.cpp中包含Person.h文件,所以编译器在编译时
// 不仅浏览了头文件,也浏览了成员函数的实现
//#include"Person.cpp"

// 2.将.h文件和.cpp文件写在一起,将后缀名改为.hpp文件
// 约定俗成.hpp文件为类模板的头文件
#include"Person.hpp"
void test01()
{
	Person<string, int> p("张三", 20);
	p.show();
}
int main()
{
	test01();
	system("pause");
	return 0;
}

Person.h

//#pragma once
//#include<iostream>
//using namespace std;
//template<class T1, class T2>
//class Person
//{
//public:
//	Person(T1 name, T2 age);
//	T1 name;
//	T2 age;
//	void show();
//};

Person.cpp

//#include"Person.h"
//
//template<class T1, class T2>
//Person<T1, T2>::Person(T1 name, T2 age)
//{
//	this->name = name;
//	this->age = age;
//}
//template<class T1, class T2>
//void Person<T1, T2>::show()
//{
//	cout << "姓名:" << this->name << endl
//		<< "年龄:" << this->age << endl;
//}

Person.hpp

#pragma once
#include<iostream>
using namespace std;

template<class T1, class T2>
class Person
{
public:
	Person(T1 name, T2 age);
	T1 name;
	T2 age;
	void show();
};
#include"Person.h"

template<class T1, class T2>
Person<T1, T2>::Person(T1 name, T2 age)
{
	this->name = name;
	this->age = age;
}
template<class T1, class T2>
void Person<T1, T2>::show()
{
	cout << "姓名:" << this->name << endl
		<< "年龄:" << this->age << endl;
}

类模板与友元

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
using namespace std;

// 告诉编译器友这个类
template<class T1, class T2>
class Person;

// 因为Person<T1, T2> p,所以前面要告诉编译器有这个类
template<class T1, class T2>
void show2(Person<T1, T2> p);

// 因为friend void show2<>(Person<T1, T2> p);,所以上面要告诉编译器有这个函数
template<class T1,class T2>
class Person
{
	// 1.全局函数类内实现
	friend void show(Person<T1,T2> p)
	{
		cout << "类内实现-->  姓名:" << p.name
			<< "年龄:" << p.age << endl;
	}

	// 2全局函数类外实现
	// 如果不加<>就表明是普通函数的声明,而不是模板函数
	// 这里不用写template<class T1,class T2>是因为和类共用了;
	friend void show2(Person<T1, T2> p);

	// 或者这样也行
	//template<class T1, class T2>
	//friend void show2(Person<T1, T2> p);
public:
	Person(T1 name, T2 age)
	{
		this->name = name;
		this->age = age;
	}
private:
	T1 name;
	T2 age;
};

template<class T1, class T2>
void show2(Person<T1, T2> p)
{
	cout << "类外实现-->  姓名:" << p.name
		<< "年龄:" << p.age << endl;
}

// 1.全局函数友元类内实现
void test01()
{
	Person<string, int> p("张三", 20);
	show(p);
}

// 2.全局函数友元类外实现
void test02()
{
	Person<string, int> p("张三", 20);
	show2(p);
}
int main()
{
	test01();
	test02();
	system("pause");
	return 0;
}

类模板案例

类模板案例-数组类封装.hpp

#pragma once
#include<iostream>
using namespace std;
// 可以对内置数据类型和自定义数据类型进行存储
template<class T>
class MyArry
{
public:
	// 构造函数可以传入数组的容量
	MyArry(int capacity)
	{
		//cout << "参数构造函数的调用" << endl;
		this->capacity = capacity;
		this->size = 0;
		// 将数组中的数据存储到堆区
		this->arr = new T[this->capacity];
	}

	// 提供拷贝构造函数防止浅拷贝的问题
	// 浅拷贝的问题也就是堆区数据重复释放
	MyArry(const MyArry& arr)
	{
		//cout << "拷贝函数的调用" << endl;
		this->capacity = arr.capacity;
		this->size = arr.size;
		this->arr = new T[this->capacity];
		int i = 0;
		for (i = 0; i < this->size; i++)
		{
			this->arr[i] = arr.arr[i];
		}
	}

	// operator=防止浅拷贝的问题
	MyArry& operator=(MyArry& arr)
	{
		//cout << "operator=的调用" << endl;

		if (this->arr != NULL)
		{
			delete[] this->arr;
			this->capacity = 0;
			this->size = 0;
			//this->arr = NULL;
		}
		this->capacity = arr.capacity;
		this->size = arr.size;
		this->arr = new T[this->capacity];
		int i = 0;
		for (i = 0; i < this->size; i++)
		{
			this->arr[i] = arr.arr[i];
		}
		return *this;
	}

	//可以通过下标的方式访问数组中的数据
	T& operator[](int i)
	{
		return this->arr[i];
	}


	// 尾插法
	void tailInter(const T& val)
	{
		if (this->capacity == this->size)
		{
			cout << "内存满" << endl;
			return;
		}
		else
		{
			this->arr[this->size] = val;
			this->size++;
		}
	}

	// 尾删法
	void tailDelete()
	{
		if (this->size == 0)
		{
			return;
		}
		this->size--;
	}


	// 获取当前数组容量
	int getCapacity()
	{
		return this->capacity;
	}

	// 获取当前元素个数
	int getSize()
	{
		return this->size;
	}

	// 析构函数对堆区内存释放
	~MyArry()
	{
		if (this->arr != NULL)
		{
			//cout << "析构函数的调用" << endl;
			delete[] this->arr;
			this->arr = NULL;
			this->capacity = 0;
			this->size = 0;
		}
	}
	
private:
	T* arr; // 在堆区创建数组
	int capacity;// 数组容量
	int size;// 数组实际内容个数
};

类模板案例-数组类封装.cpp

#define _CRT_SECURE_NO_WARNINGS 
#include<iostream>
#include<string>
using namespace std;
#include"类模板案例-数组类封装.hpp"

void myPrint(MyArry<int>& p)
{
	for (int i = 0; i < p.getSize(); i++)
	{
		cout << p[i] << endl;
	}
}
void test01()
{
	MyArry<int> p1(5);
	int i = 0;
	for (i = 0; i < 5; i++)
	{
		p1.tailInter(i);
	}
	myPrint(p1);
	p1.tailDelete();
	cout << p1.getCapacity() << endl
		<< p1.getSize() << endl;
}
// 自定义数据类型
class Person
{
public:
	Person() {};
	Person(string name, int age)
	{
		this->name = name;
		this->age = age;
	}
	string name;
	int age;
};

void myPrint2(MyArry<Person>& p)
{
	for (int i = 0; i < p.getSize(); i++)
	{
		cout << "姓名:" << p[i].name
			<< "年龄:" << p[i].age << endl;
	}
}
void test02()
{
	MyArry<Person> p(10);
	p.tailInter(Person("张三",13));
	p.tailInter(Person("lisi", 14));
	p.tailInter(Person("wangwu", 15));
	p.tailInter(Person("zhangliu", 16));
	myPrint2(p);
}
int main()
{
	//test01();
	test02();
	system("pause");
	return 0;
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2132411.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

力扣121-买卖股票的最佳时机(Java详细题解)

题目链接&#xff1a;121. 买卖股票的最佳时机 - 力扣&#xff08;LeetCode&#xff09; 前情提要&#xff1a; 因为本人最近都来刷dp类的题目所以该题就默认用dp方法来做。 dp五部曲。 1.确定dp数组和i下标的含义。 2.确定递推公式。 3.dp初始化。 4.确定dp的遍历顺序。…

踩最深的坑,教会自己找到需求

目录 引言 1. 寻找合适的需求 2. 海外市场选择 3. 线下热点判断 4. 线上关注度分析 5. 当前竞争分析 6. 未来潜力分析 引言 在经历了刻骨铭心的合伙创业经历后&#xff0c;我意识到是时候该独立出海了。 捡起早已深埋在心里的创业想法&#xff0c;开始独自创业。 这次…

用“女神的一群舔狗”的例子深入理解线程池

假如有一个妹子&#xff08;肤白貌美身材好&#xff09; 同一时间只能谈一个对象&#xff0c;但是新鲜感过去之后就没什么意思了&#xff0c;就想换个对象&#xff0c;但是更换对象的操作效率比较低&#xff0c;需要做到&#xff1a; 1. 想办法和现有对象分手 2.吸引到下一个舔…

高低压配电系统中电弧光的危害有多大?

摘要 故障电弧是一种常见的电气故障现象&#xff0c;尤其在配电系统中&#xff0c;可能对设备安全和电力供应造成严重影响。本文旨在探讨故障电弧对配电系统的危害&#xff0c;并提出相应的预防措施&#xff0c;以增强系统的可靠性和安全性。通过对故障电弧的形成机制、危害分…

软件设计师试题

1、以下关于RISC&#xff08;精简指令集计算机&#xff09;特点的叙述中&#xff0c;错误的是&#xff08; B &#xff09;。 A.对存储器操作进行限制&#xff0c;使控制简单化 B.指令种类多&#xff0c;指令功能强 C.设置大量通用寄存器 D.选取使用频率较高的一些指令&…

利用Python快速提取字体子集

来自&#xff1a;Python大数据分析 费弗里 在我们日常进行数据可视化、web应用开发等场景中&#xff0c;经常会用到一些特殊的非系统自带字体&#xff0c;尤其是中文字体&#xff0c;由于包含的字符数量众多&#xff0c;因此体积一般都比较大&#xff0c;这在进行数据可视化读取…

C++当中的继承

在C当中继承是一个非常重要的语法。我们可以使用继承快速的进行代码的复用以及对代码进行扩展操作。首先我们来进行学习继承的基本语法。 &#xff08;一&#xff09;继承的语法方式 还记得我们之前学习的访问限定符吗&#xff1f;就是class里面的private&#xff0c;public&am…

直播间没有自然流,如何突破?

如果你的直播间完全没有自然流量&#xff0c;不用担心&#xff0c;有四种方法可以解决这个问题。 第一种方法是延长直播时长。如今的账号系统与以前不同&#xff0c;现在自然流量非常珍贵。以前&#xff0c;新账号即使没有数据&#xff0c;平台也会给一些流量&#xff0c;但现在…

校园管理新篇章:Spring Boot系统实现策略

第3章 系统分析 3.1 需求分析 校园管理系统主要是为了提高用户的工作效率和更方便快捷的满足用户&#xff0c;更好存储所有数据信息及快速方便的检索功能&#xff0c;对系统的各个模块是通过许多今天的发达系统做出合理的分析来确定考虑用户的可操作性&#xff0c;遵循开发的系…

jmeter设置全局token

1、创建setup线程&#xff0c;获取token的接口在所有线程中优先执行&#xff0c;确保后续线程可以拿到token 2、添加配置原件-Http信息头管理器&#xff0c;添加取样器-http请求 配置好接口路径&#xff0c;端口&#xff0c;前端传参数据&#xff0c;调试一下&#xff0c;保证获…

2024社群空间站全自动付费进群系统九块九进群源码

多种玩法&#xff1a;付费VIP玩法、同城行业群裂变玩法、全民K歌群裂变玩法、拼多多群玩法、VIP领取百度网盘资料玩法、单群付费玩法;

WTL580-电子锁微波雷达应用解决方案,5.8GHz精准人体感知,触发高效交互新体验

一、简介 随着智能电子门锁普及&#xff0c;电子门锁的市场也随着打开&#xff0c;安装智能化电子门锁也为大势所趋。现我司推出基于WTL580微波雷达的电子锁应用方案&#xff0c;通过检测门锁周围是有活动人体存在来激活门锁。我司WTL580微波雷达方案采用5.8GHz微米波雷达传感器…

mac系统安装最新(截止2024.9.13)Oracle JDK操作记录

文章目录 下载JDK22配置环境变量验证环境变量是否生效整体命令如下 下载JDK22 打开最新版Oracle JDK下载地址 选择想要安装的JDK版本&#xff0c;然后选择适合兼容Mac机器的版本&#xff08;Intel/arm&#xff09;&#xff0c;建议直接下载安装程序&#xff0c;可视化安装 默…

栈的定义和基本操作的实现

写代码&#xff1a;定义顺序存储的栈&#xff08;数组实现&#xff09;&#xff0c;数据元素是 int 型 写代码&#xff1a;基于上述定义&#xff0c;实现“出栈、入栈、判空、判满”四个基本操作 写代码&#xff1a;定义链式存储的栈&#xff08;单链表实现&#xff09; 写代…

零钱兑换二维dp实现(力扣--动态规划)

文章目录 1.题目描述2.解题思路3.代码实现 1.题目描述 题目链接&#xff1a;零钱兑换 2.解题思路 1.确定二维dp[i][j]的含义&#xff1a; dp[i][j] 前i个物品任取&#xff0c;装入容量为j的背包种&#xff0c;最少的硬币个数是dp[i][j] 2.确定递推公式&#xff1a; dp[i][j]…

【日语学习必备】5款超准实时翻译软件,让你的网课不再有障碍!

日语水平不过关&#xff0c;没办法实时听懂日语会议或日语网课内容怎么办&#xff1f; 两种方法&#xff01; 一、利用日语实时翻译软件&#xff0c;也就是所谓同声传译的方式实时将日语转换为中文 二、先将会议或网课等内容录制下来&#xff0c;再借助语音或视频翻译软件&am…

利士策分享,探索无界:心灵之旅,发现未知精彩

利士策分享&#xff0c;探索无界&#xff1a;心灵之旅&#xff0c;发现未知精彩 梦想的种子&#xff0c;在心田生根发芽 正如每一颗种子都蕴含着生命的奥秘&#xff0c;每个人心中那颗探索的种子&#xff0c;也藏着对未知世界的渴望与追求。它告诉我们&#xff0c;成长不仅仅…

Unite Shanghai 2024 技术专场 | Unity 6及未来规划:Unity引擎和服务路线图

在 2024 年 7 月 24 日的 Unite Shanghai 2024 技术专场演讲中&#xff0c;Unity 高级技术产品经理 Jeff Riesenmy 带来演讲 Unity 6 and Beyond: A Roadmap of Unity Engine and Services。作为本次 Unite 首场专题演讲&#xff0c;他介绍了 Unity 引擎的最新进展及其配套的工…

猫头虎分享:15种数码苹果16抢购攻略

猫头虎分享&#xff1a;15种数码苹果16抢购攻略 大家好&#xff0c;我是猫头虎&#xff01;今晚8点&#xff0c;就是大家期待已久的苹果16抢购时刻&#xff0c;你准备好了吗&#xff1f;为了帮助大家顺利抢到心仪的机型&#xff0c;我精心准备了15种抢购指南&#xff0c;总有一…

[C#学习笔记]LINQ

视频地址&#xff1a;LINQ入门示例及新手常犯的错误_哔哩哔哩_bilibili 强烈推荐学习C#和WPF的朋友关注此UP&#xff0c;知识点巨多&#xff0c;讲解透彻&#xff01; 一、基本概念 语言集成查询(Language-Intergrated Query) 常见用途 .Net原生集合(List&#xff0c;Arra…