`
文章列表
error LNK2001: unresolved external symbol _main解决办法 解决外部符号错误:_main,_WinMain@16,__beginthreadex ) 在创建MFC项目时, 不使用MFC AppWizard向导, 如果没有设置好项目参数,就会在编译时产生很多连接错误, 如error LNK2001错误, 典型的错误提示有:  libcmtd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main  LIBCD.lib(wincrt0.obj) : error LNK2001: ...

strcat 内部实现

    博客分类:
  • c++
char * strcat(char * dest, const char * src) { char *tmp = dest; while (*dest) dest++; while ((*dest++ = *src++) != '\0') ; return tmp; } 编写一个名叫my_strcat 的函数,它类似于strcat函数 但它不会溢出目标数组,它应该返回调用时传递的目标字符串,函数原型 char* str_my ...
5元30M 发送信息 KTSJLL5 到10086 20元150M 发送信息 KTSJLL20 到10086 100元2G 发送信息 KTSJLL100 到10086 200元5G 发送信息 KTSJLL200 到10086 2010年起 套餐超出后1m一元钱 一般30m都够用 你可以发送 CXGTC到10086查询剩余流量 给你推荐个北京移动的优惠套餐 以前用5元30m的也可以换成这个!! 北京移动又为广大手机上网的朋友们推出优惠套餐——可以免费用一个月 动感地带/神州行/全球通手机上网的朋友们可以选择新推出的“GPRS半年流量套餐包!”! 此套餐包(每月30M流量),可 ...

wii

设置如下: 打开WII模拟器,在上方找到【感应】打开,看到Wiimote 1——输入来源——启用,【Wiimote 2】——【输入来源】——【启用】,【Wiimote 3】——【输入来源】——【启用】,【Wiimote 4】——【输入来源】——【启用】. 你进入游戏后,在模拟器上方找到【Tools】——【连接②感应】,【连接③感应】,【连接④感应】。就可以了,另外,要在模拟器上方找到【控制】,在玩家1、2、3、4设置好键位后就可以了。 手柄的话,【感应】——输入来源——扩展什么的——经典手柄

deep copy & shallow copy

    博客分类:
  • c++
A shallow copy of an object copies all of the member field values. This works well if the fields are values, but may not be what you want for fields that point to dynamically allocated memory. The pointer will be copied. but the memory it points to will not be copied -- the field in both the original ...
先看看下面的代码: #include <iostream> using namespace std; void main() { int i = 875770417; cout<<i<<" "; char* p = reinterpret_cast<char*>(&i); for(int j=0; j<4; j++) cout<<p[j]; cout<<endl; float f = 0 ...
下载地址: http://www.51cnnet.net/directory C++ in a Nutshell free ebook download Cryptography in C and C++ free ebook download More Exceptional C++ free ebook download C++ Cookbook free ebook download Essential C++ free ebook download The Art of C++ free ebook download C++ by Dissection free ebook downl ...
首先由一个程序引入话题: 1 //环境:vc6 + windows sp2 2 //程序1 3 #include <iostream> 4 5 using namespace std; 6 7 struct st1 8 { 9 char a ; 10 int b ; 11 short c ; 12 }; 13 14 struct st2 15 { 16 short c ; 17 char a ; 18 i ...
#include<iostream.h> int main(void) { //reinterpret_cast //将一个类型指针转换为另一个类型指针,这种在转换不修改指针变量值数据存放格式 //只需在编译时重新解释指针的类型,他可以将指针转化为一个整型数但不能用于非指针的转换 double d=9.3; double* pd = &d; int* pi = reinterpret_cast<int *> (pd); class A{}; class B{}; A ...
static_cast const_cast reinterpret_cast dynamic_cast 1)staic_cast静态强制; 不能在无关的指针之间进行static类型强制 class CAnimal { //... public: CAnimal(){} }; class CGiraffe:public CAnimal { //... public: CGiraffe(){} }; int main(void) { CAnimal an; ...
1、C++各大有名库的介绍——C++标准库 2、C++各大有名库的介绍——准标准库Boost 3、C++各大有名库的介绍——GUI 4、C++各大有名库的介绍——网络通信 5、C++各大有名库的介绍——XML 6、C++各大有名库的介绍——科学计算 7、C++各大有名库的介绍——游戏开发 8、C++各大有名库的介绍——线程 9、C++各大有名库的介绍——序列化 10、C++各大有名库的介绍——字符串 11、C++各大有名库的介绍——综合 12、C++各大有名库的介绍——其他库 13、C++名人的网站 14、C++开源跨平台类库及在VC++.net中应用的配置 15、C++资源之不完全导引 在C ...
云风的BLOG Meng Yan ( 孟岩 )’s Weblog 刘未鹏|Mind Hacks 旁观者-郑钧 Script Ahead,Code Behind
1,前言   无数次听到“我要开始学习C++!”的呐喊,无数次听到“C++太复杂了,我真的 学不会”的无奈。Stan Lippman先生曾在《C++ Primer》一书中指出“C++是最为难 学的高级程序设计语言之一”,人们常将“之一”去掉以表达自 ...
1.operator overloading C++可能通过operator 重载操作符,格式如下:类型T operator 操作符 (),如比重载+,如下所示 template<typename T> class A { public:      const T operator + (const T& rhs)      {      return this->m_ + rhs;      } private:      T m_; }; 又比如STL中的函数对象,重载(),如下所示 template<typename T> struct A {    ...
如果有两个对象:one, two, 要想把one转换成为two,有两种方法: 在one在定义operator two() const函数 在two在增加two(const one&)构造函数 一般只能使用其中一种情况,而不能两种一起使用。 operator: #include <iostream> using std::cout; using std::endl; class two {     int iTwo; public:     two(int a = 0) : iTwo(a) {}     void print() const {         cout ...
Global site tag (gtag.js) - Google Analytics