Artificial mentally retarded three piece chess
After learning arrays and functions, we can do some interesting things, such as the Gobang game mentioned in this article.
First of all, before we start to write code, we need to know what the game needs and divide the modules.
Game menuHow do players choose game modegame board How players play chessComputer chess methodHow to judge winnin ...
Posted by Zyxist on Tue, 22 Feb 2022 06:01:09 +0100
[C + + basic] usage and constant reference
1.1 basic use of references
Function: alias the variable. The new alias points to the same block of memory.Syntax: data type & alias = original name
#include<iostream>
using namespace std;
//Reference, alias variables
int main(){
int a = 10;
int &b = a;
cout << "a = " << a << endl;
cout << "b = " ...
Posted by daveh33 on Tue, 22 Feb 2022 03:28:04 +0100
C + + Advanced Learning -- signal processing under multithreading / multiprocessing
catalogue
1, Introduction
2, Use of signals in multi process
------>2.1 signal processing flow
------>2.2 installation registration
------>2.3 signal set operation function
------>2.4. Set signal shielding bit function
------>2.5. Query the shelved (pending) signal function
------>2.6 summary
3, Use of signals under m ...
Posted by benyamin on Mon, 21 Feb 2022 15:49:09 +0100
The difference between const and define in C language
I const use
Const is the abbreviation of constant, which means "constant". The things modified by const are subject to mandatory protection, which can prevent accidental changes and improve the robustness of the program. So many C + + programming books suggest: "Use const whenever you need".
1.const modifier variable
#inc ...
Posted by skyer2000 on Mon, 21 Feb 2022 14:57:47 +0100
C + + Basics - overloaded assignment operator '=‘
Why should the assignment operator '=' be overloaded
In some cases, when we write a class, we do not need to overload the "=" operator for the class, because the compilation system provides the default assignment operator "=" for each class. When using this default assignment operator to operate class objects, the operator ...
Posted by scm24 on Mon, 21 Feb 2022 14:53:57 +0100
Chessboard coverage (C + + | divide and conquer | recursion)
Title Description
Description
Chessboard coverage problem: given a chessboard with a size of 2^n2^n small squares, one of the positions has been filled. Now we need to cover the remaining small squares with an L-shape (remove one of the small squares from the large squares composed of 22 small squares). Find out the covering scheme, th ...
Posted by bogeyman on Mon, 21 Feb 2022 14:50:08 +0100
File IO operation
head.h
#ifndef _HEAD_H_
#define _HEAD_H_
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#endif
01_open.c
1.open int open(const ch ...
Posted by nasser on Mon, 21 Feb 2022 12:53:26 +0100
C/C + + development based on VSCode and Cmake -- environment construction and the first entry case
development environment
ubuntu subsystem under Windows Language c/c++ IDE:vscode
Environment construction
Open the windows subsystem option for Linux Control panel - > Programs - > enable or disable Window functions - > windows subsystem options for Linux
Download and install Ubantu In the Window10 version, open the app store and ...
Posted by beebum on Mon, 21 Feb 2022 10:20:21 +0100
c + + subset enumeration
I believe everyone has done it Roast Chicken This problem. but
10
10
10 cycles is too much trouble. To
100
,
1000
100,1000
100, 1000 cyc ...
Posted by drkstr on Mon, 21 Feb 2022 06:17:47 +0100
High precision algorithm (children can understand = =)
High precision algorithm
Here comes the question time (0v0!):
Question (1):
What is a high-precision algorithm? Why do we need high-precision algorithms? What can high-precision algorithms be used for?
Question (2):
How to store a large number?
Question (3):
How can you add them up? subtract? Multiply? What about division? - ...
Posted by SerpentSword on Mon, 21 Feb 2022 06:11:41 +0100