随笔分类 -  [C++]

c++程序
摘要:#include #include #include using namespace std; int main() { char next; string message="All good!\n"; cin.get(next); while (cin.get(next) && (next != '\n')) { if (! is... 阅读全文
posted @ 2016-11-03 23:05 指间ゝ繁华初逝的格调 阅读(135) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include "stdlib.h" 3 using namespace std; 4 5 void Show() 6 { 7 cout<<"CIS 25 – C++ Programming \n"; 8 cout<<"Laney College \ 阅读全文
posted @ 2016-02-25 22:18 指间ゝ繁华初逝的格调 阅读(197) 评论(0) 推荐(0)
摘要:1 #include "stdio.h" 2 #include "string.h" 3 #include "malloc.h" 4 5 struct Student{ 6 char Stu_Number[20];//学号 7 char Stu_Name[10];//姓名 8 char Stu_Be 阅读全文
posted @ 2016-02-23 16:18 指间ゝ繁华初逝的格调 阅读(498) 评论(0) 推荐(0)
摘要:c语言 #include <stdio.h> 完整的stdio.h ==》standard input/output #include <string.h>是关于字符数组的函数定义的头文件,常用函数有strlen/strcmp/strcpy等等 #include <malloc.h>动态存储分配 i 阅读全文
posted @ 2016-02-21 21:03 指间ゝ繁华初逝的格调 阅读(130) 评论(0) 推荐(0)
摘要:1 #include<iostream> 2 #include<fstream> 3 #include<string> 4 using namespace std; 5 #define maxlen 100 6 7 //---------------------------------基类----- 阅读全文
posted @ 2016-01-01 23:36 指间ゝ繁华初逝的格调 阅读(243) 评论(0) 推荐(0)
摘要:5个菜单功能,每个菜单功能含有不同得类,构造函数,至少有一个菜单功能模块含有友元函数,友元类,多重继承,虚基类,虚函数或抽象类的应用,有异常处理。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int... 阅读全文
posted @ 2015-12-26 15:42 指间ゝ繁华初逝的格调 阅读(476) 评论(1) 推荐(0)
摘要:问题描述:统计英文文单词数,具体要求:对于给定的一片英文文章,统计单词的个数、关键词的个数、空格的个数标点符号的个数,同时还能将原来的关键词替换成新的词语 1 #include 2 #include 3 #include 4 #include 5 using namespace std;... 阅读全文
posted @ 2015-12-24 12:24 指间ゝ繁华初逝的格调 阅读(499) 评论(0) 推荐(0)
摘要:每行数据最后需要Tab处理 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int spilt_n(string s)//每行以‘\t’来统计有多个子字符串 7 { 8 const char *ch; 9 ... 阅读全文
posted @ 2015-12-18 19:08 指间ゝ繁华初逝的格调 阅读(2514) 评论(0) 推荐(0)
摘要:1 #include "iostream" 2 #include "vector" 3 using namespace std; 4 5 void print(vectorArray) 6 { 7 int i; 8 for(i=0;i&Array,int i,int j)16 {... 阅读全文
posted @ 2015-12-10 11:36 指间ゝ繁华初逝的格调 阅读(229) 评论(0) 推荐(0)
摘要:(1) 指针本身是常量不可变(char*) const pContent;const (char*) pContent;(2) 指针所指向的内容是常量不可变const (char) *pContent;(char) const *pContent;(3) 两者都不可变const char* cons... 阅读全文
posted @ 2015-12-05 16:43 指间ゝ繁华初逝的格调 阅读(178) 评论(0) 推荐(0)
摘要:#include"iostream"#include"iomanip"using namespace std;int f(int i,int n){ if(i==1||i==n) return 1; else return f(i-1,n-1)+f(i,n-1); return 0... 阅读全文
posted @ 2015-11-13 21:59 指间ゝ繁华初逝的格调 阅读(215) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 using namespace std; 4 5 enum error{overflow,underflow,success}; 6 const int maxlen=100; 7 8 class queue{ 9 public:10 q... 阅读全文
posted @ 2015-11-13 21:56 指间ゝ繁华初逝的格调 阅读(196) 评论(0) 推荐(0)