Skip to content

Commit

Permalink
archive: multi
Browse files Browse the repository at this point in the history
Signed-off-by: LetMeFly666 <[email protected]>
  • Loading branch information
LetMeFly666 committed Nov 22, 2024
1 parent 92ec86c commit 39f5d1d
Show file tree
Hide file tree
Showing 9 changed files with 390 additions and 394 deletions.
406 changes: 204 additions & 202 deletions KongMingQi.c → KongMingQi.cpp

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions Solutions/Other-Accumulation-SomeTips.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,16 @@ push_heap(v.begin(), v.end()); // 将v的最后一个元素(v.back())插入
sort_heap(v.begin(), v.end()); // 将堆排序,排序后将失去堆的特性;非堆调用此函数将会报错;大根堆会变成从小到大的排序
```
### C++使得编译器支持第三方库(以MinGW为例)
假如我想使用EasyX库编写带有图形界面的程序,那么我应该如何编译呢?
可以把`EasyX`解压出来的`.h`头文件放到`{MinGW安装位置}\x86_64-w64-mingw32\include`,库文件放到`{MinGW安装位置}\x86_64-w64-mingw32\lib`目录。
这样就能直接`#include <graphics.h>`了。编译时候需要加上参数`-leasyx`,这是因为添加了`libeasyx.a`。
如果我把库文件放到其他目录下,则还需要加上`-L目录名`(绝对路径或编译执行路径的相对路径)。
## About Website
### ip扫描工具censys
Expand Down
2 changes: 2 additions & 0 deletions Solutions/Other-English-LearningNotes-SomeWords.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,8 @@ tags: [其他, 知识, 英语, Notes]
|||
|matinee|n. (戏剧/电影的)午后场|
|peacock|n. 雄孔雀<br/>v. 炫耀,招摇过市|
|||
|pier|n. 码头,突堤,桥墩,桥柱|

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

Expand Down
2 changes: 2 additions & 0 deletions Solutions/Other-Japanese-LearningNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ xx型
|タクシー|出租车|
|空港(くうこう)|机场|
|駅(えき)|(车)站|
|新幹線(しんかんせん)|新干线|
|ホテル|酒店|
|宿題(しゅくだい)|作业|
|授業(じゅぎょう)|课程|
Expand Down Expand Up @@ -585,6 +586,7 @@ xx型
|イギリス|英国|
|カナダ|加拿大|
|カナダ|俄罗斯|
|オーストラリア|澳大利亚|
|外国(がいこく)|外国|
|アイヌ|阿伊努|
|国(くに)||
Expand Down
19 changes: 19 additions & 0 deletions tryGo/JSFUZZ.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@


格式看起来应该没什么问题了[强],但是内容上甲方大概不太会满意[捂脸]



比如第一条(5.2.1)期望结果的7,“软件运行时系统资源占用合理”、第二条(5.2.2)“反应迅速”、“布局清晰”,这种描述还是没有一个可以衡量的指标 ~
应该写成“CPU占用率不超过xx%”之类的, 【然后图1】



怎么说呢,有那么一点在向我汇报的感觉[破涕为笑],其实我更应该像是一个辅助者的角色
说实话,这些可能不太是需要这么几天才能完成的[捂脸]
这样没有准确描述的话,专家肯定是没有办法按照测试大纲进行测试和衡量的。
如果有哪些不懂或者需要我帮助的话可以随时来问我,我工作日白天没有其他事情的话应该都在



前面说的这些可能还需要参考一下,但是也别感觉有压力哈,尽量弄吧
9 changes: 9 additions & 0 deletions tryGo/OUT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
* @Author: LetMeFly
* @Date: 2024-11-22 12:40:22
* @LastEditors: LetMeFly.xyz
* @LastEditTime: 2024-11-22 12:43:16
-->
1. 签证
2. 插头
3. 携带物品
118 changes: 118 additions & 0 deletions tryGo/chat-6yggde35y.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
###
# @Author: LetMeFly
# @Date: 2024-11-20 10:02:01
# @LastEditors: LetMeFly.xyz
# @LastEditTime: 2024-11-20 11:03:40
###
你了解MinGW吗?

MinGW\x86_64-w64-mingw32\lib下有很多libxx.a,我添加一个libeasyx.a进去的话在编译的时候只需要加上个参数-leasyx就可以了。





如果我想把libeasyx.a放在MinGW\x86_64-w64-mingw32\lib\Let\这个字文件夹下,我应该如何编译





如果我把libeasyx.a放到MinGW\x86_64-w64-mingw32\lib\下的话,我只需要-leasyx就可以了
但是如果我把libeasyx.a放到MinGW\x86_64-w64-mingw32\lib\Let下的话,我就需要加上-L绝对路径才行`-LF:\OtherApps\Program\MinGW\x86_64-w64-mingw32\lib\Let`,而只加上`-LLet`就不行




链接库的问题解决了,可以编译运行demo了。
但编译另外一个文件时报错:
```
.\KongMingQi.cpp: In member function 'void PegSolitaire::drawBoard(int, int)':
.\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)'
settextstyle(60, 0, L"微软alse, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH);
^
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
from .\KongMingQi.cpp:10:
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate: 'void settextstyle(int, int, LPCTSTR)'
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace);
^~~~~~~~~~~~
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate expects 3 arguments, 14 provided
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)'
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut);
^~~~~~~~~~~~
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:250:6: note: candidate expects 9 arguments, 14 provided
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)'
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);
^~~~~~~~~~~~
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*'}
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
from .\KongMingQi.cpp:10:
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate: 'void settextstyle(const LOGFONT*)'
void settextstyle(const LOGFONT *font); // Set current text style
^~~~~~~~~~~~
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate expects 1 argument, 14 provided
.\KongMingQi.cpp: In function 'void DrawCircle(TCHAR*, int, int, int, double, int, int)':
.\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)'
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);
^
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
from .\KongMingQi.cpp:10:
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate: 'void settextstyle(int, int, LPCTSTR)'
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace);
^~~~~~~~~~~~
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate expects 3 arguments, 14 provided
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)'
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut);
^~~~~~~~~~~~
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:250:6: note: candidate expects 9 arguments, 14 provided
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)'
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);
^~~~~~~~~~~~
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*'}
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
from .\KongMingQi.cpp:10:
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate: 'void settextstyle(const LOGFONT*)'
void settextstyle(const LOGFONT *font); // Set current text style
^~~~~~~~~~~~
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate expects 1 argument, 14 provided
.\KongMingQi.cpp: In function 'void MYCIRCLE(int, int)':
.\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)'
settextstyle(22, 0, L"微软alse, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH);
^
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
from .\KongMingQi.cpp:10:
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate: 'void settextstyle(int, int, LPCTSTR)'
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace);
^~~~~~~~~~~~
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:249:6: note: candidate expects 3 arguments, 14 provided
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)'
void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut);
^~~~~~~~~~~~
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:250:6: note: candidate expects 9 arguments, 14 provided
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)'
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);
^~~~~~~~~~~~
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*'}
In file included from F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/graphics.h:12,
from .\KongMingQi.cpp:10:
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate: 'void settextstyle(const LOGFONT*)'
void settextstyle(const LOGFONT *font); // Set current text style
^~~~~~~~~~~~
F:/OtherApps/Program/MinGW/x86_64-w64-mingw32/include/Let/easyx.h:252:6: note: candidate expects 1 argument, 14 provided
```
第1025行是`settextstyle(22, 0, L"微软雅黑", 0, 0, 0, false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH);`
函数定义为`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);`
我将所有的`L"微软雅黑"`修改为了`reinterpret_cast<LPCTSTR>("微软雅黑")`,编译运行成功了。
但是现实的中文会乱码,包括但不限于其他所有的中文。
我的cpp文件是以utf-8的格式保存的。
17 changes: 17 additions & 0 deletions tryGo/tryEasyX.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* @Author: LetMeFly
* @Date: 2024-11-20 10:22:49
* @LastEditors: LetMeFly.xyz
* @LastEditTime: 2024-11-20 10:23:03
*/
#include <Let/graphics.h>
#include <conio.h>

int main()
{
initgraph(640, 480);
circle(320, 240, 100);
getch();
closegraph();
return 0;
}
Loading

0 comments on commit 39f5d1d

Please sign in to comment.