《Beginning C++17》-学习笔记-Chapter 05-Arrays and Loops

点云处理提速秘籍:用Open3D和PCL对比实现体素降采样,哪个更适合你的项目? 本文深度对比了Open3D和PCL在体素降采样技术上的实现差异与性能表现,帮助开发者根据项目需求选择最佳工具。通过实测数据、API设计对比和特殊场景案例,揭示了两者在处理速度、内存管理及细节保留上的优劣,为点云处理提速提供实用指南。 阅读详情

The size of an array must always be specified using a constant integer expression. Any integer expression that the compiler can evaluate at compile time may be used, though mostly this will be either an integer literal or a const integer variable that itself was initialized using a literal.

The index of a particular array element is its offset from the first element. The first element has an offset of 0 and therefore an index of 0; an index value of 3 refers to the fourth array element—three elements from the first.

The type of the array will determine the amount of memory required for each element. The elements of an array are stored in one contiguous block of memory.

To define an array of values that cannot be modified, you simply add the keyword const to its type.

The values returned by the sizeof operator have type of size_t. It is an unsigned integer type that is generally used, for instance, for sizes and counts of things.

size_t is not the name of a built-in fundamental type such as int, long, or double; it is a type alias defined by the Standard Library. More specifically, it is an alias for one of the unsigned integer types, sufficiently large to contain the size of any type the compiler supports (including any array). The alias is defined in the cstddef header, as well as in a number of other headers. In practice, however, you mostly do not need to include (with #include) any of these headers explicitly to use the size_t alias; the alias is often indirectly defined already by including other more high-level headers (such as the iostream header).

Array index values are not checked to verify that they are valid. It’s up to you to make sure that you don’t reference elements outside the bounds of the array. If you store data using an index value that’s outside the valid range for an array, you’ll either inadvertently overwrite something in memory or cause a socalled segmentation fault or access violation (both terms are synonymous and denote an error that is raised by the operating system if and when it detects unauthorized memory access). Either way, your program will almost certainly come to a sticky end.

It is legal to define variables within a for loop initialization expression.

Any automatic variables declared within the scope of a loop do not exist outside it.

 

//两种计算array中element个数的方法
#include <iostream>
#include <array>          // for std::size();

int main()
{
	int values[]{ 10, 10, 10, 10};

	std::cout << "Number of elements in the array is: " << sizeof(values) / sizeof(values[0]) << std::endl;/*sizeof operator returns the number of bytes that a variable occupies. This works with an entire array as well as with a single array element.*/

	std::cout << "Number of elements in the array is: " << std::size(values) << std::endl;
}

The standard formula \pi r^{^{2}} is used to calculates the area of a circle.

Any number that is a fraction with an odd denominator cannot be represented exactly as a binary floating-point value. 0.2 cannot be represented exactly in binary floating point.

Comparing floating-point numbers can be tricky. You should always be cautious when comparing the result of floating-point computations directly using operators such as ==, <=, or >=. Rounding errors almost always prevent the floating-point value from ever becoming exactly equal to the mathematical precise value.
 


The factorial of an integer n, written n!, is the product of all the integers from 1 to n; for example, 5! = 1 × 2 × 3 × 4 × 5 = 120.


The comma is a binary operator. It combines two expressions into a single expression, where the value of the operation is the value of its right operand. This means that anywhere you can put an expression, you can also put a series of expressions separated by commas.

#include <iostream>

int main()
{
	std::cout << (1,2,3,4,5) << std::endl;//输出最后一个数字5
}

 


What is a range? An array is a range of elements, and a string is a range of characters. The containers provided by the Standard Library are all ranges as well.

#include <iostream>

int main()
{
	int range_1[]{ 1, 1, 1, 1, 1};
	int total_1{};
	for (int x : range_1)
	{
		total_1 += x;
	}
	std::cout << total_1 << std::endl;//输出5

	int total_2{};
	for (auto x : { 1, 1, 1, 1, 1 })//A braced initializer list itself is a valid range
	{
		total_2 += x;
	}
	std::cout << total_2 << std::endl;//输出5

}

#include <iostream>

int main()
{
	int n{};
	int sum{};
	while (++n <= 3)// variable n is first incremented, then compared with integer literal 3.
	{
		sum += n; 
	}
	std::cout << sum<< std::endl;//输出6

}

#include <iostream>
#include <cctype>    /* For tolower() function,也可以改为#include <locale>*/

int main()
{
	char reply{};                                      // Stores response to prompt for input
	int count{};                                       // Counts the number of input values
                               
	do
	{
		std::cout << "You ate " << ++count << ((count ==1)?" apple":" apples") << std::endl;     

		std::cout << "Do you want to eat another apple? (y/n): ";
		std::cin >> reply;                                // Get response

	} while (tolower(reply) == 'y');//此处必须加一个分号

	std::cout << "You ate " << count << ((count == 1) ? " apple" : " apples") << " in total." << std::endl;
}

//利用nested loops 输出10x10乘法表
#include <iostream>
#include <iomanip>

int main()
{

	for (size_t i{ 1 }; i <= 10; ++i)
	{   
		std::cout << std::setw(3) << i << "|"; // Start the row
		
		for (size_t j{ 1 }; j <= 10; ++j)
		{
			std::cout << std::setw(3) << i * j << "|";  // Output the values in a row.
		}
		std::cout << std::endl; 
	}

}

/*This outputs all the printable characters with code values from 0 to the maximum unsigned char value so it displays a handy list of the codes for the printable ASCII characters.*/
#include <iostream>
#include <iomanip>
#include <cctype>
#include <limits>

int main()
{
	// Output the column headings
	std::cout << std::setw(11) << "Character " << std::setw(13) << "Hexadecimal "
		<< std::setw(9) << "Decimal " << std::endl;
	std::cout << std::uppercase;                                      // Uppercase hex digits

	// Output characters and corresponding codes
	unsigned char ch{};
	do
	{
		if (!std::isprint(ch))                                           // If it's not printable...the isprint() function only returns true for printable characters.
			continue;                                                      // ...skip this iteration
		std::cout << std::setw(6) << ch                                  // Character
			<< std::hex << std::setw(12) << static_cast<int>(ch)   // Hexadecimal
			<< std::dec << std::setw(10) << static_cast<int>(ch)   // Decimal
			<< std::endl;
	} while (ch++ < std::numeric_limits<unsigned char>::max()); /*numeric_limits<>::max() function returns the maximum value for the type you place between the angled brackets.*/
}

// Sorting an array in ascending sequence - using an indefinite while loop
#include <iostream>
#include <iomanip>

int main()
{
	const int array_size{ 10 };
	int x[array_size]{10,9,8,7,6,5,4,3,2,1};                    
		
	std::cout << "Starting sort..." << std::endl;
	//bubble sort algorithm
	while (true)
	{
		bool swapped{ false };          
		for (size_t i{}; i < array_size-1; ++i)
		{
			if (x[i] > x[i + 1])          
			{
				const auto temp = x[i];
				x[i] = x[i + 1];
				x[i + 1] = temp;
				swapped = true;
			}
		}

		if (!swapped)                   // If there were no swaps, data are in order; otherwise, go round again.

	std::cout << "Result:\n";
	for (size_t i{}; i < array_size -1; ++i)
	{
		std::cout << std::setw(3) << x[i];
	}

	std::cout << std::endl;
}

/*A character array that is terminated by '\0' is referred to as a C-style string. */
#include <iostream>
#include <iomanip>

int main()
{

	int int_array[]{ 1, 2, 3, 4,5 };
	char char_array1[]{ 'a','i','o','u' };
	char char_array2[]{ "aiou" };/*array initiated with a string literal; the null character will be stored in the element following the last string character,*/

	std::cout << int_array <<std::endl;//输出乱码
	std::cout << char_array1 << std::endl; //输出aiou以及一些乱码
	std::cout << char_array2 << std::endl;/*输出aiou. You can output a string stored in an array just by using the array name. 
						There must be a '\0' at the end of the array. If there isn’t, the standard output stream 
						will continue to output characters from successive memory locations, which almost certainly 
						contain garbage, until either a null character happens to turn up or an illegal memory access occurs.*/

}

#include <iostream>
#include <cctype>

int main()
{
	const int max_length{ 100 };              // Array size
	char text[max_length]{};                // Array to hold input string

	std::cout << "Enter a line of text:" << std::endl;

	std::cin.getline(text, max_length);		// Read a line of characters including spaces
        /* The getline() function for cin reads a sequence of characters, including 
spaces. By default, the input ends when a newline character, '\n', is read, which will 
be when you press the Enter key. The getline() function expects two arguments between 
the parentheses. The first argument specifies where the input is to be stored, which in 
this case is the text array. The second argument specifies the maximum number of 
characters that you want to store. This includes the string termination character, '\0', 
which will be automatically appended to the end of the input.*/
	std::cout << "You entered:\n" << text << std::endl;//输出之前输入的所有字符

}

#include <iostream>
#include <array>   //this header defines  array<T,N> template

int main()
{
	std::array<double, 100> values; //This creates an object that has 100 elements of type double.
	values.fill(1);//set all elements to 1.
	std::cout << values.size() << std::endl;// return the number of elements of variable values.

	//using range-based for loop to sum up all elements in values.
	int total{};
	for (auto w : values)
	{
		total += w;
	}
	std::cout << total <<std::endl;

	std::array<double, 100> values2 =values; //copy all elements of values to values2;
	std::cout << values2.at(99) << std::endl;// return the number of elements of variable values.

	std::cout << values[2] << std::endl;// return the value of the third element, which is 1.
	std::cout << values.at(2) << std::endl;/*return the third element as well; at() function for an array<> object will detect attempts to use an index value outside the legitimate range*/
	std::cout << ( values.front() == values[0] )<< std::endl;
	std::cout << ( values.back() == values[values.size() - 1] ) << std::endl;

	//using for loop to sum up all the elements in an array.
	double total1{};
	for (size_t i{}; i < values.size(); ++i)
	{
		total1 += values[i];
	}
	std::cout << total1 << std::endl;//return the sum of all elements , which is 100
	//using range-based for loop to sum up all the elements in an array.
	double total2{};
	for (auto value : values)
	{
		total2 += value;
	}
	std::cout << total1 << std::endl;//return the sum of all elements , which is 100

}

#include <iostream>
#include <vector>   //including this header for using the vector<> container 

int main()
{
	std::vector<double> values(20); //creating a vector<> container that contains 20 values of type double, all initialized to 0
	values.push_back(3.1415); // Add an element to the end of the vector
	std::cout << values.size() << std::endl;//output 21

	std::vector<long> numbers(20, 99L); // Initialize a vector that contains 20 long values - all 99
	std::cout << numbers.size() << std::endl;//output 21
	std::vector<long> numbers2;
	numbers2.assign(99, 20L); //  Using assign() functions reinitialize the contents of a vector that contains 99 long values - all 20
	std::cout << numbers2.size() << std::endl;//output 99

	std::vector<int> data(100, 99); // Contains 100 elements initialized to 99
	data.clear(); // Remove all elements
	std::cout << data.size() << std::endl;//output 0

	std::vector<int> data2(100, 99); // Contains 100 elements initialized to 99
	data2.pop_back(); // Remove the last element
	std::cout << data2.size() << std::endl;//output 99

}

 


// using a vector<T> container to store numbers
#include <iostream>
#include <iomanip>
#include <vector>

int main()
{
	std::vector<double> x;               // Stores data to be sorted

	while (true)
	{
		double input{};                   // Temporary store for a value
		std::cout << "Enter numbers you want to store one after another; enter a non-zero value, or 0 to end: ";
		std::cin >> input;
		if (input == 0)
			break;

		x.push_back(input);
	}

	std::cout << "Your entered the following data.\n";

	for (size_t i{}; i < x.size(); ++i)
	{
		std::cout << std::setw(8) << x[i];

	}
	std::cout << std::endl;
}

 


The range-based for loop iterates over all elements within a range. An array is a range of elements, and a string is a range of characters. The array and vector containers define a range so you can use the range-based for loop to iterate over the elements they contain.


#include <iostream>
#include <iomanip>

int main()
{
	std::cout << "显示4位小数: "  << std::setprecision(4) << std::fixed << (static_cast<double>(4)) << std::endl;
	//std::fixed Output floating-point data in fixed-point notation.
	/*std::setprecision(n) Sets the floating-point precision or the number of decimal places to n digits.
	If the default floating - point output presentation is in effect, n specifies the
		number of digits in the output value.If fixed or scientific format has
		been set, n is the number of digits following the decimal point.The default
		precision is 6*/
}

#include <iostream>

int main()
{
	unsigned count{};
	char ch{};

	std::cout << "Please enter a sequence of characters terminated by '#':" << std::endl;

	do {
		std::cin >> ch;//cin不读取空格,回车
		++count;
	} while (ch != '#');

	std::cout << "You entered " << count << " characters (not counting spaces)." << std::endl;
}

#include <iostream>

int main()
{
	const size_t max_num_characters{ 1'000 };
	char string[max_num_characters];

	std::cout << "Please enter a string: ";
	std::cin.getline(string, max_num_characters);

	// Count the number of characters
	size_t count{};
	for (; count < max_num_characters && string[count] != '\0'; ++count) {}

	// Print out the characters in reverse order
	for (size_t i = 1; i <= count; ++i)
	{
		std::cout << string[count - i];
	}
	std::cout << std::endl;
}
#include <iostream>

int main()
{
	const size_t max_num_characters{ 1'000 };
	char string[max_num_characters];

	std::cout << "Please enter a string: ";
	std::cin.getline(string, max_num_characters);

	// Count the number of characters
	size_t count{};
	while (count < max_num_characters && string[count] != '\0')
		++count;

	// Reverse the characters of the string entered by the user
	for (size_t i = 0; i < count / 2; ++i)
	{
		char temp = string[i];
		string[i] = string[count - i - 1];
		string[count - i - 1] = temp;
	}

	// Print out all characters, one by one
	for (size_t i = 0; i < count; ++i)
	{
		std::cout << string[i];
	}
	std::cout << std::endl;
}
//输出1到1000之间不能被7整除的所有整数,每列显示10个数字
#include <iostream>
#include <iomanip>
#include <vector>

int main()
{
	std::vector<unsigned> values;
	// Add element values 1 to bound
	for (unsigned i{ 1 }; i <= 1000; ++i)
		values.push_back(i);

	size_t count{};                              // Number of output values
	size_t perline{ 10 };                          // Number output perline                 
	for (auto value : values)
	{
		if (value % 7 == 0) continue;
		std::cout << std::setw(6) << value;
		if (++count % perline == 0) std::cout << "\n";
	}
	std::cout << std::endl;
}

//  Generate 93 Fibonacci numbers stored in an array.
// 93 was not an arbitrary choice for the number  of Fibonacci numbers.
// Fibonacci number grow fairly rapidly.
// 93 is the most that are possible with type unsigned long long.

#include <iostream>
#include <array>

int main()
{
	const size_t n{ 93 };
	std::array<unsigned long long, n> fib;
	fib[0] = fib[1] = 1UL;
	for (size_t i{ 2 }; i < n; ++i)
		fib[i] = fib[i - 1] + fib[i - 2];

	std::cout << "The first " << n << " Fibonacci numbers are:\n";
	for (auto number : fib)
	{
		std::cout << number << std::endl;
	}
}


 

《Beginning C++17》-学习笔记-Chapter 01-Basic Ideas 书名:Beginning C++17 - From Novice to Professional 作者:Ivor Horton, Peter Van Weert 笔记: Blocks can be placed inside other blocks—this concept is called nesting. Blocks can be nested, one within anothe... 阅读详情

相关推荐

《Beginning C++17》-学习笔记-Chapter 07-Working with Strings

#include &lt;iostream&gt; #include &lt;string&gt;//This header of the C++ Standard Library defines the std::string type /*Type string is a compound type, which is a type that’s a composite of severa...

CodingIsFun 538

the size of an array must be greater than zero

  Keil默认情况下,不允许出现长度为0的数组,例如char name[0];。   解决方法是使用gnu模式:Options for target -> C/C++ -> Misc Control -> input "--gnu"。

健身房 3733

告别混乱!用Cadence Capture CIS高效管理你的原理图库:以单逻辑器件K9F2G08U0M为例

本文以单逻辑器件K9F2G08U0M为例,详细介绍了如何使用Cadence Capture CIS高效管理原理图库。通过三级分类体系、工程化命名规范和智能检索技术,帮助工程师实现从混乱到有序的转变,提升团队协作效率和设计准确性。

aizhi0169的博客 411

长度大小为零的数组(柔性数组、可变数组)

柔性数组(Arrays of Length Zero)是GNU/GCC在C/C++标准下扩展而引出的概念,其主要应用于构造可变长结构体中,嵌入式领域中一般被用于解析不定长数据包情境下。长度大小为0的数组这种定义是GNU/GCC扩展下引出的新特性,C/C++在C99标准下也对其进行了扩展支持,二者定义可能稍有不同。GNU/GCC下柔性数组定义char flag;int state;有些编译器并不认可这种定义方式,编译会报错提示数组长度必须大于0取而代之需要采用以下定义,定义一个长度未知的数组。

qiushui984620的博客 1835

Git系列(一)、Git基础教程【建议收藏】

Git一、Git简介1.1、什么是Git? 一、Git简介 1.1、什么是Git? Git是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或大或小的项目。 Git是Linus Torvalds为了帮助管理Linux内核开发而开发的一个开放源代码的版本控制软件。 Git与常用的版本控制工具CVS、Subversion等不同,它采用了分布式版本库的方式,不用服务器端软件支持。 .........

一宿君 5万+

如何查看在电脑里登陆过的微信帐号的聊天记录

打开微信电脑版,点击左下角 "≡" 菜单 → 选择 "设置"进入 "账号与存储"(旧版为" 文件管理 ")选项卡在 "存储位置"一栏查看当前实际保存路径,可点击" 打开文件夹 " 直接访问查看电脑里登录过的微信账号聊天记录,首选官方客户端直接登录查看,操作简单且安全;若账号已退出,可通过备份恢复功能处理;仅需查看媒体文件时,可定位到FileStorage 文件夹直接访问。无论哪种方式,都需遵守隐私保护原则,并注意聊天记录的加密特性限制。

捷利迅分享的博客 4754

Value *** is outside of valid range for type java.lang.Integer

类型转换异常

龙城之家的博客 3865

可视化工具--Plotly

随着信息技术的发展和硬件设备成本的降低,当今的互联网存在海量的数据,要想快速从这些数据中获取更多有效的信息,数据可视化是重要的一环。对于Python语言来说,比较传统的数据可视化模块是Matplotlib,但它存在不够美观、静态性、不易分享等缺点,限制了Python在数据可视化方面的发展。   为了解决这个问题,新型的动态可视化开源模块Plotly应运而生。由于Plotly具有动态、美观、易用、种类丰富等特性,所以一经问世就受到开发人员的喜爱。

YFater的博客 1万+

keil中编译遇到错误“error #94-D the size of an array must be greater than zero”解决方法

这一期,我们来看一个在keil中编译时候遇到定义数组元素个数为0时候遇到的一个错误。

OMGMac的博客 1473

Python爬虫深度对抗:拼多多与得物价格监控系统中的设备指纹模拟与SkyWalking风控绕过实战

在电商数据采集领域,拼多多和得物(毒)APP堪称国产风控系统的“双子星”。前者依托于拼多多集团强大的安全团队,后者则以其独特的“潮流单品”数据价值和高昂的爬取成本闻名。对于任何一名爬虫工程师而言,能够稳定、高效地获取这两大平台的价格、库存、销量等动态信息,都是一项极具挑战性的技术试金石。传统的基于requests库的简单HTTP请求,在面对这两款应用时几乎寸步难行。你会发现,无论怎样伪造User-Agent、怎样轮换代理IP,返回的永远是状态码412403,或者是一个包含验证滑块设备异常的JSON错误。

2201_76125261的博客 873

硬件测试有哪些?

硬件单元测试(UT)是验证电路功能与可靠性的关键环节,主要分为电源测试和信号测试两大模块。电源测试需验证输入电压范围、高低压极限、短路保护等功能,确保供电稳定性;信号测试则聚焦时钟、总线、存储等接口的时序与完整性。测试要求统一标准、可追溯数据、问题闭环处理,通过开发与测试协同确保质量。规范的单元测试能有效降低后期集成风险,提升产品可靠性,其核心始终是在最小单元上确保稳健性,为系统级可靠性奠定基础。

硬核科技 251

c语言sizeof报错,关于C中sizeof(class)用法引发的错误

当我在C中编译我的项目时,MSVC抛出以下错误:error #94: the size of an array must be greater than zero在执行sizeof时,在以下行中抛出错误:if (sizeof (MyNamespace::MyClass) == 60)因此定义了MyClass:class MyClass: public ParentClass{public:MyCl...

weixin_39743824的博客 1065

【UG\NX二次开发】多个带ui的dll怎么整合到一个dll

NX二次开发-群精选」专栏收录了那些曾散落在聊天对话框里的精彩的知识分享,这都是被遗落的宝贵财富。让我们一起向大佬学习,充满激情地进步,不断超越自己。底部联系方式,欢迎您加入一起交流。有大佬知道多个带ui的dll怎么整合到一个dll吗。

王牌飞行员_里海的博客 293

c语言 多文件 连接错误,C中多文件中遇到的一些问题

最近在研究MSP430单片机的编程,开发环境是IAR for430.昨天调了一个程序,一直没有搞懂怎么出错的,知道今天才解决。总结下经验我的初衷是想定义一个全局数组,在main.c外的aa.h中声明了一个数组为 intaa[4];然后在aa.c文件中对数组赋初值。之后在main.c中调用数组aa某些元素的值。结果死活都调不通。错误类型如下:Error[Pe094]: the size of an ...

weixin_32848231的博客 2205

手游功耗优化:从猜想到硬核实测

功耗本质是“硬件在吃电”,要看电流/功率曲线,而不是只看帧率和温度;定量 = 有数字、有曲线、有对比能说“降了 15%”、“峰值从 7W 降到 5.5W”,而不是“我感觉凉快点”;工具方面:大厂会用外接功率仪 + 手机/芯片厂内部平台;平时也会用 Android/iOS/引擎自带的工具做趋势分析;流程上:选典型机型和场景 → 跑脚本采集 → 对齐 Profiler 数据 → 分析 CPU/GPU/网络谁在吃电;再通过版本对比、画质/帧率组合测试,指导配置和优化。这是一个。

本博客聚焦游戏开发技巧、创业实战心得及大学热门课程干货。这里既有技术深度,也有思维广度,无论你是开发者、创业者还是高校学子,都能在这里找到适合自己的成长之路! 188

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

【C++】《C++ 17 入门经典》读书笔记 08----数组的替代品之二: std::vector 容器

介绍 C++17 中数组的替代品: std::vector 容器。

风语留痕 488

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

【C++】《C++ 17 入门经典》读书笔记 07----数组的替代品之一: std::array 容器

介绍 C++17 中的数组替代品之一: std::array<T, N>容器。

风语留痕 661

全球国家地区城市数据

MySQL全球国家地区城市数据报。。。。。。。。。。。。

vb 6.0并口开发操作实例

vb6并口开发,简体中文,试例内有inpout32.dll动态链接库

《C++ Without Fear》学习笔记

书名:C++ Without Fear A Beginner’s Guide That Makes You Feel Smart 作者:Brian Overland 阅读时间:2018/10/6-2018/10/20 书摘+书评: An important rule of good programming style is that variables should usually...

CodingIsFun 832

《Beginning C++17》-学习笔记-Chapter 11-Defining Your Own Data Types

Every object of a given class incorporates the same combination of things, specifically, the set of data values as member variables of the class that characterize an object and the set of operations a...

CodingIsFun 667

《Beginning C++17》-学习笔记-Chapter 04-Making Decisions

There are only two possible bool values, true and false. True and false are keywords and are literals of type bool. They are sometimes called Boolean literals. #include &lt;iostream&gt; int main() ...

CodingIsFun 492

《Beginning C++17》-学习笔记-Chapter 09-Functions Templates

// Using a function template #include &lt;iostream&gt; #include &lt;string&gt; #include &lt;vector&gt; template&lt;typename T&gt; T larger(T a, T b); // Function template prototype // a speciali...

CodingIsFun 458

《Beginning C++17》-学习笔记-Chapter 08-Defining Functions

/*A function with a return type other than void must return a value of the type specified in the function header. The only exception to this rule is the main() function, where reaching the closing bra...

CodingIsFun 457

《Beginning C++17》-学习笔记-Chapter 10-Program Files and Preprocessing Directives

#include "..\Power.h" /*including the file called Power.h located in the folder that includes the foler that includes this file.*/ Each source file, along with the contents of all the header files ...

CodingIsFun 425
上一篇: 《The Passionate Programmer》书摘
下一篇: 《Beginning C++17》-学习笔记-Chapter 06-Pointers and References
CodingIsFun
博客等级 码龄8年 37粉丝 240原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址