c语言
唐维康
这个作者很懒,什么都没留下…
展开
-
collect2: error: ld returned 1 exit status编译错误
1.问题描述在Linux下进行多文件(oneWay_List.c LinkList.c LinkList.h)编译时gcc -v版本太旧了gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)命令 gcc oneWay_List.c -o a.out -std=c99就出错2.解决方法主要是跟gcc的链接器有关,将这几个文件一起...原创 2020-02-09 14:27:09 · 1721 阅读 · 0 评论 -
Linux下系统函数open,read,write,lseek函数
一、简介1. open头文件#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h>定义函数:int open(const char * pathname, int flags);int open(const char * pathname, int flags...原创 2019-11-28 13:10:37 · 1714 阅读 · 0 评论 -
回调函数案列(C高级)
编译器:vs20131.实质其实回调就是一种利用函数指针进行函数调用的过程。 函数指针是指向函数的指针变量。 因而“函数指针”本身首先应是指针变量,只不过该指针变量指向函数。2.回调的思想如果你有一个对数的操作,你现在还不知道是对它做加还是乘,还是别的什么运算。这个时候就可以定一个标准的函数框架,在调用的时候,将我要用的那个函数名作为参数传入,则进行相应的操作。3.c代码3.1 Cal...原创 2019-11-22 23:51:59 · 195 阅读 · 0 评论 -
二级指针读取文件(显示行数、读取、释放内存)
1.读取的文件test.txt2.c代码duQu01.c#include <stdlib.h>#include <stdio.h>#define _CRT_SECURE_NO_WARNINGS int getFileLine(FILE *file)//文件有几行{ if (file == NULL) { printf("Read failed...原创 2019-11-19 11:01:25 · 382 阅读 · 0 评论 -
将txt文件内容通过cgi和apache显示在网页上
准备工作:安装apachecentos云系统xftp和MobaXterm_CHS参考博客:在linux上实现cgi内容在网页上显示https://blog.csdn.net/taw19960426/article/details/102533769一、c语言cgi程序和data.txtdata.txtaaaaa将txt文件和c文件都存放于/var/www/cgi-bin文...原创 2019-10-14 13:54:43 · 742 阅读 · 0 评论 -
在linux上实现cgi内容在网页上显示
所需工具:1.MobaXterm_CHS MobaXterm向Windows桌面提供所有重要的远程网络工具(SSH,X11,RDP,VNC,FTP,MOSH ……)和Unix命令(bash,ls,cat,sed,grep,awk,rsync等) ,在一个开箱即用的单个便携式exe文件中。为您的远程任务提供一体化网络应用程序有很多优点2.xftp Xftp是一个功能强大的SFTP、FTP...原创 2019-10-13 16:18:32 · 1658 阅读 · 0 评论 -
对比DFT程序与FFT程序的效率
徐士良老师编写的c语言算法程序下载链接:https://pan.baidu.com/s/1zDV6iLeYeXmZaoZlP4yRAA 提取码:8opo 一:徐士良老师编写的FFT程序比较1.FFT源程序【kfft.c】抽样点为:64CLOCKS_PER_SEC 单位1000ms #include "math.h" void kfft(pr,pi,n,k,fr,fi) i...原创 2019-06-03 20:02:56 · 1380 阅读 · 0 评论 -
gnuplot绘图,使用C语言输出
产生采样率为8000次每秒的正弦信号,时长为1秒(8000点)。正弦信号的幅度为0.6,频率为500Hz,或50Hz,将500Hz和50Hz的两个正弦信号相加。分别用gnuplot画出相应的波形图。编译器:TCC第一步:c语言产生数据(1)频率为500Hz的c程序#include <stdio.h>#include <stdlib.h>#include <...原创 2019-06-03 14:29:48 · 1811 阅读 · 0 评论 -
C语言编写FFT程序
徐士良老师编写的c语言算法程序下载链接:https://pan.baidu.com/s/1zDV6iLeYeXmZaoZlP4yRAA 提取码:8opo 一、什么是FFT?FFT(Fast Fourier Transformation)是离散傅氏变换(DFT)的快速算法。即为快速傅氏变换。它是根据离散傅氏变换的奇、偶、虚、实等特性,对离散傅立叶变换的算法进行改进获得的。二、FFT的作用...原创 2019-06-05 11:08:02 · 23309 阅读 · 20 评论 -
有空头链表
#include <stdio.h>#include <stdlib.h>//节点结构体struct Node{ int a; struct Node *pNext;} ;//头尾指针定义 struct Node *g_pHead=NULL; struct Node *g_pEnd=NULL; //空头链表初始化void LianBiaoCh...原创 2019-05-23 21:43:23 · 468 阅读 · 0 评论 -
无空头链表详解(增删改查)
#include <stdio.h>#include <stdlib.h>//节点结构体struct Node{ int a; struct Node *pNext;} ;//链表的头尾指针struct Node *g_pHead=NULL; struct Node *g_pEnd=NULL; //链表清空 需要遍历 void qingko...原创 2019-05-23 11:21:54 · 522 阅读 · 0 评论 -
链表尾添加
#include <stdio.h>#include <stdlib.h>//节点结构体struct Node{ int a; struct Node *pNext;} ;//链表的头尾指针struct Node *g_pHead=NULL; struct Node *g_pEnd=NULL; //创建链表,在链表中增加一个数据(尾添加) vo...原创 2019-05-22 16:33:34 · 551 阅读 · 0 评论 -
回文串判断
输入义词字符,判断相反后是否一样(getchar()的吸收功能)include <stdlib.h>#include <stdio.h>#include <string.h>int main(){ int i,n,len,t,j;//t用来判断两数组是否相同 char a[100]; char b[100]; while(scanf("%d...原创 2019-05-20 20:52:37 · 189 阅读 · 0 评论 -
c语文编程提取郑码的单字码表
incode.txtson文件链接:https://pan.baidu.com/s/1ZNpe0bZJcMPPQYKo97Y9OQ 提取码:22br1.代码如下:#include <stdio.h>#include <stdlib.h>#include <string.h> int main(){ FILE *fp; char c...原创 2019-05-10 23:42:18 · 344 阅读 · 0 评论