首页下载资源后端2022年第一篇C语言50行代码制作爱心电子相册的代码

ZIP2022年第一篇C语言50行代码制作爱心电子相册的代码

qq_4589399911.26MB需要积分:1

资源文件列表:

Project1.zip 大约有39个文件
  1. .vs/
  2. .vs/Project1/
  3. .vs/Project1/v14/
  4. .vs/Project1/v14/.suo 10.5KB
  5. Debug/
  6. Debug/Project1.exe 111.5KB
  7. Debug/Project1.ilk 633.62KB
  8. Debug/Project1.pdb 692KB
  9. Project1.sln 1.28KB
  10. Project1.VC.db 25.52MB
  11. Project1.VC.VC.opendb 38B
  12. Project1/
  13. Project1/Debug/
  14. Project1/Debug/main.obj 29.62KB
  15. Project1/Debug/Project1.log 275B
  16. Project1/Debug/Project1.tlog/
  17. Project1/Debug/Project1.tlog/CL.command.1.tlog 496B
  18. Project1/Debug/Project1.tlog/CL.read.1.tlog 20.17KB
  19. Project1/Debug/Project1.tlog/CL.write.1.tlog 340B
  20. Project1/Debug/Project1.tlog/link.command.1.tlog 990B
  21. Project1/Debug/Project1.tlog/link.read.1.tlog 2.66KB
  22. Project1/Debug/Project1.tlog/link.write.1.tlog 318B
  23. Project1/Debug/Project1.tlog/Project1.lastbuildstate 184B
  24. Project1/Debug/vc140.idb 507KB
  25. Project1/Debug/vc140.pdb 148KB
  26. Project1/images/
  27. Project1/images/1.jpg 110.63KB
  28. Project1/images/10.jpg 110.63KB
  29. Project1/images/2.jpg 110.63KB
  30. Project1/images/3.jpg 110.63KB
  31. Project1/images/4.jpg 110.63KB
  32. Project1/images/5.jpg 110.63KB
  33. Project1/images/6.jpg 110.63KB
  34. Project1/images/7.jpg 110.63KB
  35. Project1/images/8.jpg 110.63KB
  36. Project1/images/9.jpg 110.63KB
  37. Project1/main.cpp 1.41KB
  38. Project1/Project1.vcxproj 5.62KB
  39. Project1/Project1.vcxproj.filters 945B

资源介绍:

2022年第一篇C语言50行代码制作爱心电子相册的代码
#include #include #include #include"mmsystem.h" #pragma comment(lib,"winmm.lib") struct Point //位置 { int x; int y; }; IMAGE img[10];//10张照片 void initImgage() { char buf[128] = { 0 }; //图片的路径 for (int i = 0; i < 10; i++) { sprintf_s(buf, "images\\%d.jpg", i + 1); loadimage(&img[i], buf, 40, 40);//40x40大小 } } void main() { initgraph(800, 800); Point arr[46] = { { 395, 268 },{ 406, 222 },{ 416, 193 },{ 441, 162 }, { 468, 133 },{ 500, 117 },{ 537, 105 },{ 577, 107 },{ 617, 120 }, { 649, 146 },{ 666, 173 },{ 680, 211 },{ 683, 247 },{ 680, 293 }, { 675, 338 },{ 660, 385 },{ 640, 440 },{ 616, 484 },{ 580, 529 }, { 557, 573 },{ 530, 610 },{ 493, 645 },{ 460, 675 },{ 422, 696 }, { 381, 676 },{ 350, 654 },{ 320, 626 },{ 292, 606 },{ 257, 570 }, { 230, 540 },{ 200, 500 },{ 180, 470 },{ 160, 430 },{ 140, 390 }, { 126, 342 },{ 117, 293 },{ 120, 250 },{ 133, 203 },{ 160, 170 }, { 200, 140 },{ 240, 130 },{ 280, 135 },{ 312, 146 },{ 340, 170 }, { 360, 195 },{ 375, 230 } }; initImgage(); mciSendString("open qiqiu.mp3", 0, 0, 0); mciSendString("play qiqiu.mp3", 0, 0, 0); int index = 0; while (1) { cleardevice(); for (int i = 0; i < 46; i++) { putimage(arr[i].x, arr[i].y, &img[(i + index) % 10]); putimage(400, 400, 100, 100, &img[(i + index) % 10], -.10, -10); } index++; Sleep(1000); } closegraph(); }
100+评论
captcha