
C/C++学习
文章平均质量分 69
adminmttt
兴趣使然的计算机科学小站
展开
-
C&C++学习笔记1--The seven steps of programming
The seven steps of programming1.Define the program objectives.2.Design the program3.Write the code.4.Compile.5.Run the program.6.Test and debug the program7,Maintain and modify the progr转载 2016-07-09 11:36:37 · 542 阅读 · 1 评论 -
数据结构链表总结
1.链表数据类型typedef struct LNODE{ int data; struct LNODE *next;}LNODE,*LinkList;指向结构体的指针。通过指针操作,来申请空间,插入数据,输出数据,释放空间。2.创建链表bool CreatList(LinkList &L){ LNODE *P; int x; L = (LinkList)malloc(原创 2016-07-31 16:04:49 · 488 阅读 · 0 评论 -
数据结构应用题线性表的顺序表示
一、从顺序表中删除具有最小值的元素(假设唯一)并由函数返回被删元素的值。空出的位置由最后一个元素填补,若顺序表为空,则显示出错误信息,并退出运行。ElemType ElemMinDelete(SqList &L){ int i; ElemType min; min = L.data[0]; for (i = 0; i < L.length; i++) { if (L.d原创 2016-07-14 17:20:48 · 509 阅读 · 0 评论 -
数据结构笔记---线性表
线性表线性表的定义和基本操作:n个相同的数据类型、有限序列————————————————————编号 |书名 |出版社————————————————————1 |高等数学 |清华大学出版————————————————————2 |数据结构 |清华大学出版社————————————————————....|......... |.....原创 2016-07-14 16:15:58 · 429 阅读 · 0 评论 -
结构体和数据结构学习
版权声明:本文为博主原创文章,未经博主允许不得转载。[cpp] view plain copy #include "stdafx.h" #include #include #include #include #define TSIZE 45 struct film { c原创 2016-07-14 00:09:17 · 455 阅读 · 0 评论 -
实现买菜功能(未完成代码)
#include "stdafx.h"#include #define PRICEOFARTICHOKES_PERPOUND 1.255#define PRICEOFBEET_PERPOUND 0.65#define PRICEOFCARROT_PERPOUND 0.89float get_the_price_artichokes(float f){ float price; p原创 2016-07-12 17:42:34 · 441 阅读 · 0 评论 -
C语言学习笔记字符读入读出
1.编写一个程序。该程序读取输入直到遇到#字符,然后报告读取的空格数目、读取的换行符数目以及读取的所有其他字符数目。个人给出答案#include "stdafx.h"#include int _tmain(int argc, _TCHAR* argv[]){ char c; int i, j, k; i = 0; j = 0; k = 0; while (c = get原创 2016-07-12 14:59:46 · 769 阅读 · 0 评论 -
C语言Printf()&scanf() 学习笔记
prinf()和sanf()函数用于输入和输出,关于数据整型、字符型和浮点型此时对应的都是一个scanf("%d",&i);或者是scanf("%c",&c);又或者是scanf("%f",&f);如果遇到字符串,解决思路如下:#include "stdafx.h"#include #include #define PRAISE "What a marvelous原创 2016-07-11 21:48:02 · 447 阅读 · 0 评论 -
The Basic Data Types1
基础的数据类型设置为如下11个关键词:int, long , short, unsigned, char ,float, double, signed,_Bool,_Complex,和_Imaginary有符号的整型:这些数有分正数和负数:int--是已有系统的基础整型,C语言保证至少有16位的存储用于int型short 或者是 short int --最大的短整型不会大于int型翻译 2016-07-11 12:06:09 · 562 阅读 · 0 评论 -
C&C++学习笔记2
《C Primer Plus 5th Edition》摘录Object Code Files,Executable Files,and Librariesbasic strategy: use programs that convert your source code fileto an executable file ,which is a file containing r转载 2016-07-09 15:49:36 · 517 阅读 · 0 评论 -
二叉树的建立学习笔记
http://blog.sina.com.cn/s/blog_a19e8c1b01016m2v.html#include #define ElemType char//节点声明,数据域、左孩子指针、右孩子指针typedef struct BiTNode{ char data; struct BiTNode *lchil转载 2016-08-16 22:01:02 · 382 阅读 · 0 评论