上一页 1 2 3 4 5 6 7 ··· 18 下一页

C++ 用条件编译 控制开发过程中输出调试信息

摘要: #include using namespace std;#define DEBUGSWITCH 1int main() { cout << "Hello World !!!" << endl;#if DEBUGSWITCH cout << "Debug Info" << endl;#endif return 0;} 阅读全文
posted @ 2013-08-13 19:33 Yours风之恋 阅读(291) 评论(0) 推荐(0) 编辑

C++ 头文件格式和函数注释格式

摘要: /******************************************************************* * Copyright(c) 2000-2013 Company Name * All rights reserved. * * 文件名称: * 简要描述: * * 当前版本:2.0 * 作者: * 日期: * 说明: * * 取代版本:1.0 * 作者: * 日期: * 说明: ******************************************************************/#ifndef HEAD_H_TEST... 阅读全文
posted @ 2013-08-13 19:32 Yours风之恋 阅读(1157) 评论(0) 推荐(0) 编辑

MS VC 自然对齐 声明示例

摘要: #include using namespace std;typedef unsigned char BYTE;enum Color {RED = 0x01,BLUE,GREEN,YELLOW,BLACK};#ifdef _MSC_VER#pragma pack(push,8)#endifstruct Sedan{ double m_price; Color m_color; bool m_hasSkylight; bool m_isAutoShift; BYTE m_seatNum;};#ifdef _MSC_VER#pragma pack(pop);#endif 阅读全文
posted @ 2013-07-23 11:14 Yours风之恋 阅读(151) 评论(0) 推荐(0) 编辑

C++ 中内存分配和回收

摘要: void Allocate(char* &p,int size) { p = (char*)malloc(size);}void Test(void) { char *str = NULL; Allocate(str,100); strcpy(str,"Hello World!"); printf(str); free(str);} 阅读全文
posted @ 2013-07-16 09:51 Yours风之恋 阅读(208) 评论(0) 推荐(0) 编辑

C# 中var的用法说明

摘要: 使用var定义变量时有以下四个特点:1. 必须在定义时初始化。也就是必须是var s = “abcd”形式,而不能是如下形式:var s;s = “abcd”;2. 一但初始化完成,就不能再给变量赋与初始化值类型不同的值了。3. var要求是局部变量。4. 使用var定义变量和object不同,它在效率上和使用强类型方式定义变量完全一样。 阅读全文
posted @ 2013-05-16 09:08 Yours风之恋 阅读(225) 评论(0) 推荐(0) 编辑

WPF(命令)

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows. 阅读全文
posted @ 2013-05-15 19:02 Yours风之恋 阅读(245) 评论(0) 推荐(1) 编辑

MEF

摘要: MEF核心笔记(1)基础应用MEF核心笔记(2)Catalog的种类MEF核心笔记(3)细说MEF中的Attribute [上]MEF核心笔记(4)细说MEF中的Attribute [下]MEF核心笔记(5)是模式还是设计 阅读全文
posted @ 2013-05-04 14:05 Yours风之恋 阅读(165) 评论(0) 推荐(0) 编辑

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

摘要: 2. LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt解决方法:项目-->工程属性->配置属性-> 清单工具->输入和输出->嵌入清单,选择[否] ----------->只要设这个就可以了项目-->项目属性-->配置属性-->清单工具-->使用FAT32解决方法为 是;出处:http://tenz.blog.163.com/blog/static/60802417201231093752741/ 阅读全文
posted @ 2013-05-03 14:35 Yours风之恋 阅读(136) 评论(0) 推荐(0) 编辑

年度单身舞会队列

摘要: using System;using System.Collections;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;namespace TestOfQueueDancers{ class Program { static void Main(string[] args) { Queue males = new Queue(); Queue females = new Queue();... 阅读全文
posted @ 2013-04-26 10:06 Yours风之恋 阅读(126) 评论(0) 推荐(0) 编辑

简单的用堆栈实现的表达式计算

摘要: using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.RegularExpressions;namespace 简单表达式求解{ class Program { static void Main(string[] args) { Stack numbs = new Stack(); Stack ops = new St... 阅读全文
posted @ 2013-04-25 14:20 Yours风之恋 阅读(239) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 18 下一页