随笔分类 - [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...
阅读全文
摘要: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 \
阅读全文
摘要: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
阅读全文
摘要:c语言 #include <stdio.h> 完整的stdio.h ==》standard input/output #include <string.h>是关于字符数组的函数定义的头文件,常用函数有strlen/strcmp/strcpy等等 #include <malloc.h>动态存储分配 i
阅读全文
摘要:1 #include<iostream> 2 #include<fstream> 3 #include<string> 4 using namespace std; 5 #define maxlen 100 6 7 //---------------------------------基类-----
阅读全文
摘要:5个菜单功能,每个菜单功能含有不同得类,构造函数,至少有一个菜单功能模块含有友元函数,友元类,多重继承,虚基类,虚函数或抽象类的应用,有异常处理。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int...
阅读全文
摘要:问题描述:统计英文文单词数,具体要求:对于给定的一片英文文章,统计单词的个数、关键词的个数、空格的个数标点符号的个数,同时还能将原来的关键词替换成新的词语 1 #include 2 #include 3 #include 4 #include 5 using namespace std;...
阅读全文
摘要:每行数据最后需要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 ...
阅读全文
摘要: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 {...
阅读全文
摘要:(1) 指针本身是常量不可变(char*) const pContent;const (char*) pContent;(2) 指针所指向的内容是常量不可变const (char) *pContent;(char) const *pContent;(3) 两者都不可变const char* cons...
阅读全文
摘要:#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...
阅读全文
摘要: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...
阅读全文

浙公网安备 33010602011771号