自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

转载 C的计算器

#include <stdio.h>#include <ctype.h>#include <stdlib.h>int result(int a,char b,int c){ int i; switch (b) { case '+': i=(a+c); break; case '-':...

2010-06-15 14:49:00 102

转载 return type specification for constructor invalid

类函数结束是否加了分号转载于:https://www.cnblogs.com/vcyuyan/articles/1757453.html

2010-06-13 00:08:00 481

转载 写一个删除字符串1中包含字符串2程序

#include <iostream>using std::cout;using std::endl;char *delstr(char*a,char*b){ char*st=a,*s2,*s1;while (*st&&*b){ s1=st;s2=b;while (*s1&&*s2&&am...

2010-06-08 10:04:00 183

转载 stray '\163' in program

缺失符号,或检查符号大小写转载于:https://www.cnblogs.com/vcyuyan/articles/1749851.html

2010-06-02 11:26:00 1172

转载 alignment must be a small power of two, not 12

#pragma pack(12)//对齐不能不能是12,应该是2的平方数转载于:https://www.cnblogs.com/vcyuyan/articles/1747252.html

2010-05-29 23:36:00 536

转载 two or more data types in declaration of `main'

#include <iostream>#pragma pack(8)using std::cout;using std::endl;struct example1{ short a; long b;}struct example2{ char c; example1 struct1; short e;}#pragma pack()int main(){example2 s...

2010-05-29 22:16:00 394

转载 二叉树

#ifndef TREENODE_H#define TREENODE_Htemplate<class NODETYPE> class Tree;template<class NODETYPE>class TreeNode{ friend class Tree<NODETYPE>;public: TreeNode(const N...

2010-05-12 04:45:00 61

转载 一个使用位段的程序

#include <iostream>using namespace std;int main(){struct mybitfields{unsigned short a : 4;unsigned short b : 5;unsigned short c : 7;}test;int i;test.a=2;//10test.b=3;//11test.c=4;//100...

2010-05-11 15:14:00 47

转载 流读取操作符cin遇到文件结束符返回0

代码#include <iostream>using std::cout;using std::cin;using std::endl;int main(){ int grade,hightestGrade=-1; cout<<"enter grade(enter end-of-file to end):"; while(cin>&...

2010-05-08 21:57:00 122

转载 利用函数计算字符串1中出现字符串2的次数

'a'was found in "This is a test".'z'was not found in "This is a test".利用函数计算字符串1中出现字符串2的次数#include <iostream>using std::cout;using std::endl;int main(){ char *string...

2010-05-08 16:52:00 315

转载 位段

针对类或结构中unsigned或int成员,C++提供了为其指定存储位数的能力,这种成员称为位段。利用位段可用最小的位数来存放数据以更好地利用内存。位段成员必须被声明为unsigned或int类型。1 struct BitCard{ 2 unisgned face:4;3 unsigned suit:2;4 unsigned color:1;5 };包括了3个unsi...

2010-05-08 13:34:00 111

转载 高性能洗牌与发牌程序

代码 1 // shuffle.cpp : Defines the entry point for the console application. 2 // 3 #include "stdafx.h" 4 #include <iostream> 5 using std::cout; 6 using std::cin; 7 using ...

2010-05-08 11:03:00 125

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除