刚开始学习C语言 求大佬教导
codeblocks吧
全部回复
仅看楼主
level 1
2018年09月04日 13点09分 1
level 5
https://github.com/hongwenjun/CodeBlocks/raw/master/CHM/cplusplus-2013-8-8.chm
给你一本 C/C++ 语言手册,到里面自己看相关函数的示例代码
更多文章访问下图网页
2018年09月05日 01点09分 2
level 5
scanf 函数的参数,要求是个地址,如果遇到 数字 int double float 参数要用 & 取地址符号
如果是字符串和指针,本身是个地址,就不用&
参数是结构体,也要用 &取地址, 其他就是 "引号中符号" 和参数对应就可以了
========================================================
/* scanf example */
#include <stdio.h>
int main ()
{
char str [80];
int i;
printf ("Enter your family name: ");
scanf ("%s",str);
printf ("Enter your age: ");
scanf ("%d",&i);
printf ("Mr. %s , %d years old.\n",str,i);
printf ("Enter a hexadecimal number: ");
scanf ("%x",&i);
printf ("You have entered %#x (%d).\n",i,i);
return 0;
}
2018年09月05日 01点09分 3
1