摘要:quack.h quackLL.c clientQuack.c 运行下面命令实现编译
阅读全文
摘要:判断语句 C 语言提供了以下类型的判断语句。点击链接查看每个语句的细节。 ? : 运算符(三元运算符) 我们已经在前面的章节中讲解了 条件运算符 ? :,可以用来替代 if...else 语句。它的一般形式如下: 其中,Exp1、Exp2 和 Exp3 是表达式。请注意,冒号的使用和位置。 ? 表达
阅读全文
摘要:quack.h quack.c separateQuack.c Run in terminal output:
阅读全文
摘要:参考:shell学习笔记(1)Linux下在一行执行多条命令 要实现在一行执行多条Linux命令,分三种情况: 1、&& 举例: lpr /tmp/t2 && rm /tmp/t2 第2条命令只有在第1条命令成功执行之后才执行。当&&前的命令“lpr /tmp/t2”成功执行后"rm /tmp/t2
阅读全文
摘要:修改桌面主题:How to Install Desktop Themes on Ubuntu 18.04 LTS 命令行显示短路径:怎样ubuntu下命令行终端显示短路径 gedit 扩展插件:Useful Gedit plugins for programmers 修改分辨率:Ubuntu 18.
阅读全文
摘要:A program can open and close, and read from, and write to, a file that is defined by the user This is generally done when you have large volumes of st
阅读全文
摘要:替换文件地址:C:\Users\z5194293\AppData\Roaming\CodeBlocks 文件下载地址:default.rar 通过 Settings -> Editor... -> Syntax highlighting 来修改 效果如下:
阅读全文
摘要:Command-Line Arguments All the executable programs above have a main(void) program more generally, executables take arguments on the command line thes
阅读全文
摘要:1. 直接编译,会自动生成 a.out 文件,此文件即为可执行文件 下面代码可以生成相同用户名的 .o 文件,生成 getchar.o 文件 下面代码可以生成指定名称的 executable,生成 getchar 文件 2. 运行时间计算,使用 time 命令 The time command re
阅读全文
摘要:1. 构建 Makefile 文件后运行错误,undefined reference to 'sqrt' 实际上是没有链接math数学库,所以要 $gcc test.c –lm //-lm就是链接到math库。 参考:C 语言 undefined reference to 'sqrt' 问题解决 参
阅读全文
摘要:makefile 主要是用来合并编译文件 前面就是参数设置,为了后面便与修改 puzzle.c 为主函数 boardADT.c 为 ADT 文件 boardADT.h 为头文件 gcc 参数 -c:Compile and assemble, but do not link. (生成 .o 文件,名字
阅读全文
摘要:文件名:Testrun 问题一: not found Testrun 解答:Ah got it, it's CRLF again - even sh has trouble reading files with it. Run dos2unix Testrun and then afterwards
阅读全文
摘要:类似类的形式 boardADT.h:所有的宏、声明等部分写在这里 boardADT.c:只需要 #inclue "boardADT.h",不需要 include 其他系统头文件,然后在此建立 struct,类似属性的内容,建立各种函数,类似方法的内容 puzzle.c:只需要 #inclue "bo
阅读全文
摘要:注意:如果对于函数中指针参数的对应值进行修改,当调用该函数后,实参会被修改,所以如果不想要实参被修改,需要为函数的形参定义一个 str_copy 的量,通过 strcpy() 进行将字符串复制给 str_copy。
阅读全文
摘要:<stdlib.h>(1) <stdlib.h>(2) malloc() 用来动态地分配内存空间,分配成功返回指向该内存的地址,失败则返回 NULL。 前面的 (int*) 或者 (char*) 表明数据类型 realloc() 重新分配内存空间 atoi() C 库函数 int atoi(cons
阅读全文
摘要:参考:算法时间复杂度和空间复杂度的计算 时间复杂度计算 去掉运行时间中的所有加法常数。(例如 n2+n+1,直接变为 n2+n) 只保留最高项。(n2+n 变成 n2) 如果最高项存在但是系数不是1,去掉系数。(n2 系数为 1)
阅读全文
摘要:参考:int main(int argc,char * argv[]) windows 下的使用 参考:The program can't start because libgcc_s_dw2-1.dll is missing Notice: 测试代码: test3.c 编译后会生成文件 test3
阅读全文
摘要:Week 1 Exercises fiveDigit.c There is a 5-digit number that satisfies 4 * abcde = edcba, that is,when multiplied by 4 yields the same number read back
阅读全文
摘要:参考:Python判断文件是否存在的三种方法 参考:在python文件中执行另一个python文件 参考:How can I make a time delay in Python? 参考:Twilio SMS Python Quickstart 1. 收集某一区域的实时数据 Name: AUS.p
阅读全文