![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
"dandan"不能定义
一切特立独行的人格都意味着强大!!
展开
-
【C/C++常见的编译,链接错误】
1.fatal error C1003: error Count exceeds number; stopping compilation中文对照:(编译错误)错误太多,停止编译分析:修改之前的错误,再次编译2.Fatal error C1004: unexpected end of file found中文对照:(编译错误)文件未结束分析:一个函数或者一个结构定义缺少“}”、或者在一个函数调用或表达式中括号没有配对出现、或者注释符“/…/”不完整等3.fatal error C1083: Ca原创 2022-04-01 21:05:56 · 5802 阅读 · 1 评论 -
【解决Visual Studio系列控制台一闪而过的问题】
方法1:main函数中添加system(“pause”);语句。注意:加头文件#include <windows.h>#include <stdio.h>#include <windows.h>int main(){ printf("12345678"); system("pause"); return 0;}方法2:右击project,选择属性 -->链接器–>系统—>子系统—>控制台—>应用—>确认原创 2022-03-11 17:14:39 · 330 阅读 · 0 评论 -
答疑:打印倒写大V
#include<stdio.h>#include<stdlib.h>int main(){ int i,j,n; printf("Please Enter n:\n"); scanf("%d",&n); for(i=1; i<=n; i++) { for(j=1; j<=n+i-1; j++) //控制每行的每个位置打印什么 if(j==n-i+1||j==n+i-1)//控原创 2021-12-10 10:54:45 · 522 阅读 · 0 评论 -
答疑:输出金字塔
#include <stdio.h>int main(){ int i, space, rows, k=0; printf("Enter number of rows: "); scanf("%d",&rows); for(i=1;i<=rows;++i, k=0) { for(space=1;space<=rows-i;++space) { printf(" "); .原创 2021-12-10 10:52:36 · 358 阅读 · 0 评论 -
答疑:输出空心矩形
#include <stdio.h>void DrawRectangle(int x1, int y1, int x2, int y2){ int i,j; int w = x2-x1; int h = y2-y1; if (w <= 0 || h <= 0) { printf("宽度和高度都要大于0\n"); } for (i = 0;i < h;i++) { for (j =原创 2021-12-10 10:51:12 · 265 阅读 · 0 评论 -
答疑:快速排序
#include <stdio.h>int a[101],n;//定义全局变量,这俩需要在子函数中使用void quicksort(int left,int right) { int i,j,t,temp; if(left>right) { return; } temp=a[left]; //基准数 i=left; j=right; while(i!=j) { while(a[j]>原创 2021-12-10 10:49:17 · 72 阅读 · 0 评论