
c语言
firstcode666
这个作者很懒,什么都没留下…
展开
-
配置vim,打造自己的C IDE
在网上看到大神们玩Vim,顿时产生兴趣,想要模仿一下,目的是要转至linux下学习C编程 1.下载vim及基本配置 终端下 $sudo apt-get install vim 输入命令 $vim ~/.vimrc 创建vim环境设置文件 基本配置如下: :set nu "设置显示行号 :set backspace=2 ...转载 2021-11-10 19:28:53 · 561 阅读 · 0 评论 -
VIM里设置TAB及自动换行
今天在使用vim编辑器时发现默认的tab键是8个字符,于是就想到把它设为四个空格,经过百度,得到了以下方法: 首先进入~/.vimrc 然后在文档末尾加上以下代码: set tabstop=4 设置tab键缩进为4个字符 set expandtab 转化为空格 set autoindent 设置自动缩进 但是这时又出现了新的问题,在运行时报错:TabError: Inconsistent use of tabs and spaces in indentation 为了解决...转载 2021-11-09 19:04:29 · 1758 阅读 · 0 评论 -
如何用xcode创建c语言程序
1 2 3 4 5 6 分步阅读 如何用xcode创建c语言程序 工具/原料 macbook pro xcode 方法/步骤 打开xcode软件,点击创建项目。 选择command line,点击next。 选择语言,创建名字。 创建文件夹。 单击main.c文件。 这就是c语言程序了。 E...转载 2021-10-23 16:11:44 · 2637 阅读 · 1 评论 -
array type ‘char [30]‘ is not assignable [duplicate]
#include <stdio.h> #include <stdlib.h> typedef struct node { int id; int salary; struct node *next; char name[30]; } List; int main() { List *head = (List *) malloc(sizeof(List)); //allocated memory for head if(head == NULL) { .转载 2021-10-15 18:05:18 · 2230 阅读 · 0 评论