Skip to content

Commit 39f5d1d

Browse files
committed
archive: multi
Signed-off-by: LetMeFly666 <[email protected]>
1 parent 92ec86c commit 39f5d1d

File tree

9 files changed

+390
-394
lines changed

9 files changed

+390
-394
lines changed

KongMingQi.c renamed to KongMingQi.cpp

Lines changed: 204 additions & 202 deletions
Large diffs are not rendered by default.

Solutions/Other-Accumulation-SomeTips.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,16 @@ push_heap(v.begin(), v.end()); // 将v的最后一个元素(v.back())插入
552552
sort_heap(v.begin(), v.end()); // 将堆排序,排序后将失去堆的特性;非堆调用此函数将会报错;大根堆会变成从小到大的排序
553553
```
554554
555+
### C++使得编译器支持第三方库(以MinGW为例)
556+
557+
假如我想使用EasyX库编写带有图形界面的程序,那么我应该如何编译呢?
558+
559+
可以把`EasyX`解压出来的`.h`头文件放到`{MinGW安装位置}\x86_64-w64-mingw32\include`,库文件放到`{MinGW安装位置}\x86_64-w64-mingw32\lib`目录。
560+
561+
这样就能直接`#include <graphics.h>`了。编译时候需要加上参数`-leasyx`,这是因为添加了`libeasyx.a`。
562+
563+
如果我把库文件放到其他目录下,则还需要加上`-L目录名`(绝对路径或编译执行路径的相对路径)。
564+
555565
## About Website
556566
557567
### ip扫描工具censys

Solutions/Other-English-LearningNotes-SomeWords.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,8 @@ tags: [其他, 知识, 英语, Notes]
811811
|||
812812
|matinee|n. (戏剧/电影的)午后场|
813813
|peacock|n. 雄孔雀<br/>v. 炫耀,招摇过市|
814+
|||
815+
|pier|n. 码头,突堤,桥墩,桥柱|
814816

815817
<p class="wordCounts">单词收录总数</p>
816818

Solutions/Other-Japanese-LearningNotes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ xx型
381381
|タクシー|出租车|
382382
|空港(くうこう)|机场|
383383
|駅(えき)|(车)站|
384+
|新幹線(しんかんせん)|新干线|
384385
|ホテル|酒店|
385386
|宿題(しゅくだい)|作业|
386387
|授業(じゅぎょう)|课程|
@@ -585,6 +586,7 @@ xx型
585586
|イギリス|英国|
586587
|カナダ|加拿大|
587588
|カナダ|俄罗斯|
589+
|オーストラリア|澳大利亚|
588590
|外国(がいこく)|外国|
589591
|アイヌ|阿伊努|
590592
|国(くに)||

tryGo/JSFUZZ.bash

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
3+
格式看起来应该没什么问题了[强],但是内容上甲方大概不太会满意[捂脸]
4+
5+
6+
7+
比如第一条(5.2.1)期望结果的7,“软件运行时系统资源占用合理”、第二条(5.2.2)“反应迅速”、“布局清晰”,这种描述还是没有一个可以衡量的指标 ~
8+
应该写成“CPU占用率不超过xx%”之类的, 【然后图1】
9+
10+
11+
12+
怎么说呢,有那么一点在向我汇报的感觉[破涕为笑],其实我更应该像是一个辅助者的角色
13+
说实话,这些可能不太是需要这么几天才能完成的[捂脸]
14+
这样没有准确描述的话,专家肯定是没有办法按照测试大纲进行测试和衡量的。
15+
如果有哪些不懂或者需要我帮助的话可以随时来问我,我工作日白天没有其他事情的话应该都在
16+
17+
18+
19+
前面说的这些可能还需要参考一下,但是也别感觉有压力哈,尽量弄吧

tryGo/OUT.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!--
2+
* @Author: LetMeFly
3+
* @Date: 2024-11-22 12:40:22
4+
* @LastEditors: LetMeFly.xyz
5+
* @LastEditTime: 2024-11-22 12:43:16
6+
-->
7+
1. 签证
8+
2. 插头
9+
3. 携带物品

tryGo/chat-6yggde35y.bash

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
###
2+
# @Author: LetMeFly
3+
# @Date: 2024-11-20 10:02:01
4+
# @LastEditors: LetMeFly.xyz
5+
# @LastEditTime: 2024-11-20 11:03:40
6+
###
7+
你了解MinGW吗?
8+
9+
MinGW\x86_64-w64-mingw32\lib下有很多libxx.a,我添加一个libeasyx.a进去的话在编译的时候只需要加上个参数-leasyx就可以了。
10+
11+
12+
13+
14+
15+
如果我想把libeasyx.a放在MinGW\x86_64-w64-mingw32\lib\Let\这个字文件夹下,我应该如何编译
16+
17+
18+
19+
20+
21+
如果我把libeasyx.a放到MinGW\x86_64-w64-mingw32\lib\下的话,我只需要-leasyx就可以了
22+
但是如果我把libeasyx.a放到MinGW\x86_64-w64-mingw32\lib\Let下的话,我就需要加上-L绝对路径才行`-LF:\OtherApps\Program\MinGW\x86_64-w64-mingw32\lib\Let`,而只加上`-LLet`就不行
23+
24+
25+
26+
27+
链接库的问题解决了,可以编译运行demo了。
28+
但编译另外一个文件时报错:
29+
```
30+
.\KongMingQi.cpp: In member function 'void PegSolitaire::drawBoard(int, int)':
31+
.\KongMingQi.cpp:253:164: error: no matching function for call to 'settextstyle(int, int, const wchar_t [5], int, int, int, bool, bool, bool, int, int, int, int, int)'
32+
settextstyle(60, 0, L"微软alse, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH);
33+
^
34+
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
35+
from .\KongMingQi.cpp:10:
36+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate: 'void settextstyle(int, int, LPCTSTR)'
37+
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace);
38+
^~~~~~~~~~~~
39+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate expects 3 arguments, 14 provided
40+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:250:6: note: candidate: 'void settextstyle(int, int, LPCTSTR, int, int, int, bool, bool, bool)'
41+
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut);
42+
^~~~~~~~~~~~
43+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:250:6: note: candidate expects 9 arguments, 14 provided
44+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:251:6: note: candidate: 'void settextstyle(int, int, LPCTSTR, int, int, int, bool, bool, bool, BYTE, BYTE, BYTE, BYTE, BYTE)'
45+
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut, BYTE fbCharSet, BYTE fbOutPrecision, BYTE fbClipPrecision, BYTE fbQuality, BYTE fbPitchAndFamily);
46+
^~~~~~~~~~~~
47+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:251:6: note: no known conversion for argument 3 from 'const wchar_t [5]' to 'LPCTSTR' {aka 'const char*'}
48+
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
49+
from .\KongMingQi.cpp:10:
50+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate: 'void settextstyle(const LOGFONT*)'
51+
void settextstyle(const LOGFONT *font); // Set current text style
52+
^~~~~~~~~~~~
53+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate expects 1 argument, 14 provided
54+
.\KongMingQi.cpp: In function 'void DrawCircle(TCHAR*, int, int, int, double, int, int)':
55+
.\KongMingQi.cpp:950:204: error: no matching function for call to 'settextstyle(int, int, const wchar_t [5], int, int, int, bool, bool, bool, int, int, int, int, int)'
56+
settextstyle(22, 0, L"微软ariable * 3600 / fors, variable * 3600 / fors, 0, false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH);
57+
^
58+
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
59+
from .\KongMingQi.cpp:10:
60+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate: 'void settextstyle(int, int, LPCTSTR)'
61+
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace);
62+
^~~~~~~~~~~~
63+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate expects 3 arguments, 14 provided
64+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:250:6: note: candidate: 'void settextstyle(int, int, LPCTSTR, int, int, int, bool, bool, bool)'
65+
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut);
66+
^~~~~~~~~~~~
67+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:250:6: note: candidate expects 9 arguments, 14 provided
68+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:251:6: note: candidate: 'void settextstyle(int, int, LPCTSTR, int, int, int, bool, bool, bool, BYTE, BYTE, BYTE, BYTE, BYTE)'
69+
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut, BYTE fbCharSet, BYTE fbOutPrecision, BYTE fbClipPrecision, BYTE fbQuality, BYTE fbPitchAndFamily);
70+
^~~~~~~~~~~~
71+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:251:6: note: no known conversion for argument 3 from 'const wchar_t [5]' to 'LPCTSTR' {aka 'const char*'}
72+
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
73+
from .\KongMingQi.cpp:10:
74+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate: 'void settextstyle(const LOGFONT*)'
75+
void settextstyle(const LOGFONT *font); // Set current text style
76+
^~~~~~~~~~~~
77+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate expects 1 argument, 14 provided
78+
.\KongMingQi.cpp: In function 'void MYCIRCLE(int, int)':
79+
.\KongMingQi.cpp:1025:162: error: no matching function for call to 'settextstyle(int, int, const wchar_t [5], int, int, int, bool, bool, bool, int, int, int, int, int)'
80+
settextstyle(22, 0, L"微软alse, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH);
81+
^
82+
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
83+
from .\KongMingQi.cpp:10:
84+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate: 'void settextstyle(int, int, LPCTSTR)'
85+
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace);
86+
^~~~~~~~~~~~
87+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate expects 3 arguments, 14 provided
88+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:250:6: note: candidate: 'void settextstyle(int, int, LPCTSTR, int, int, int, bool, bool, bool)'
89+
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut);
90+
^~~~~~~~~~~~
91+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:250:6: note: candidate expects 9 arguments, 14 provided
92+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:251:6: note: candidate: 'void settextstyle(int, int, LPCTSTR, int, int, int, bool, bool, bool, BYTE, BYTE, BYTE, BYTE, BYTE)'
93+
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut, BYTE fbCharSet, BYTE fbOutPrecision, BYTE fbClipPrecision, BYTE fbQuality, BYTE fbPitchAndFamily);
94+
^~~~~~~~~~~~
95+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:251:6: note: no known conversion for argument 3 from 'const wchar_t [5]' to 'LPCTSTR' {aka 'const char*'}
96+
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
97+
from .\KongMingQi.cpp:10:
98+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate: 'void settextstyle(const LOGFONT*)'
99+
void settextstyle(const LOGFONT *font); // Set current text style
100+
^~~~~~~~~~~~
101+
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate expects 1 argument, 14 provided
102+
```
103+
104+
105+
106+
107+
108+
第1025行是`settextstyle(22, 0, L"微软雅黑", 0, 0, 0, false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH);`
109+
函数定义为`void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut, BYTE fbCharSet, BYTE fbOutPrecision, BYTE fbClipPrecision, BYTE fbQuality, BYTE fbPitchAndFamily);`
110+
111+
112+
113+
114+
115+
116+
我将所有的`L"微软雅黑"`修改为了`reinterpret_cast<LPCTSTR>("微软雅黑")`,编译运行成功了。
117+
但是现实的中文会乱码,包括但不限于其他所有的中文。
118+
我的cpp文件是以utf-8的格式保存的。

tryGo/tryEasyX.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* @Author: LetMeFly
3+
* @Date: 2024-11-20 10:22:49
4+
* @LastEditors: LetMeFly.xyz
5+
* @LastEditTime: 2024-11-20 10:23:03
6+
*/
7+
#include <Let/graphics.h>
8+
#include <conio.h>
9+
10+
int main()
11+
{
12+
initgraph(640, 480);
13+
circle(320, 240, 100);
14+
getch();
15+
closegraph();
16+
return 0;
17+
}

0 commit comments

Comments
 (0)