
C/C++
yexianyi
Software Architect @ Siemens
Email: yexianyi@hotmail.com
Linkedin: http://cn.linkedin.com/in/yexianyi/
Github: https://github.com/yexianyi/
展开
-
C语言:关于计算字符串中空格数的问题
C语言:关于计算字符串中空格数的问题以下是C语言代码:(请参看注释)#include #include #include using namespace std;int main(int argc, char *argv[]){ int count = 0 ; char* str ; printf("Inpu原创 2008-11-22 22:16:00 · 4615 阅读 · 3 评论 -
C++中的空类,默认产生的类成员函数
C++中的空类,默认产生的类成员函数class Empty { public: Empty(); // 缺省构造函数 Empty(const Empty&); // 拷贝构造函数 ~Empty();原创 2009-04-04 23:28:00 · 1102 阅读 · 1 评论 -
源码:微软strcpy,strcat和strcmp的实现源代码
<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:simsun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable;转载 2009-04-19 22:28:00 · 11625 阅读 · 11 评论 -
C/C++: 关于C/C++的内部类问题(2nd)
关于C/C++的内部类问题(2nd) 一直以来我都对Java中的内部类比较熟悉,但是却忽略了C++中的内部类。现对其做出如下总结。 程序1: #include class Outer{ public: Outer() { cout<<"Invoke Outer Constructor"<<endl ;原创 2009-04-30 09:02:00 · 3058 阅读 · 5 评论 -
C程序:矩阵元素排序
Requirement: 编写一程序,把M×N矩阵a的元素逐列按降序排列。假设M、N不超过10。分别编写求一维数组元素值最大和元素值最小的函数,主函数中初始化一个二维数组a[10][10],调用定义的两函数输出每行、每列的最大值 代码: // MatrixSort.cpp : Defines the entry point for the console application.原创 2010-04-11 16:09:00 · 4305 阅读 · 7 评论 -
C Language: A Example of Print Snake Matrix
// SnakeMatrix.cpp : Defines the entry point for the console application.// Create by Xianyi.Ye, May 4,2010#include "stdafx.h"#include /*Question: Print a Sanke Matrix as following原创 2010-05-04 21:30:00 · 1039 阅读 · 1 评论