相关分类: Java技术 C/C++ VB delphi
  • 明显调用的表达式前的括号必须具有(指针)函数类型 编

    看到明显调用的表达式前的括号必须具有(指针)函数类型这句时我才发现我的语文水平有多烂,怎么看都看不懂,折腾了半天才知道是哪里出了问题。 举个简单的例子 class CTest{void (CTest::*m_pFun)();void CallFun(){(this-*m_pFun)();//OK,对象指针和函数名一定要用括...

    2018-06-17 23:43:51

  • 对象 && 构造函数

    class A{ public: int a; int b; int c; //默认构造函数 }; int main(){ A a ; A e { }; A f ( ); //不行 A c { 1 , 2 }; A d { 1 , 2 , 3 };} 当对象的数据成员是public,在创建对象时可以在初始化列表中指定他们的值。 class A{ public : int a; int b; int c; A( in...

    2018-06-17 23:43:50

  • hdu-2444-二分图判定+最大分配

    The Accomodation of Students Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5451Accepted Submission(s): 2491 Problem Description There are a group of students. Some of them may know each other, w...

    2018-06-17 23:43:44

  • 分治法求集合最大元

    题目:输入n 然后输入n个整数,用分治法求这n个数中的最大元; 思路:把这列数分成两半,递归下去,到只剩一个数时停止,返回这个数,如果不是一个数则返回分成的两段数最大值的较大者; 实验提示:在规模为 n 的数据元素集合中找出最大元。当 n=2 时,一次比较就可以...

    2018-06-17 23:43:43

  • 线性筛法(欧拉筛法)求素数

    时间复杂度O(n)当n比较大时欧拉筛法所用的时间比O(nloglogn)的算法的时间少的会越来越明显 为什么呢? 因为在欧拉筛法中,每一个合数只被访问并将其所对的f[]的值修改了一次。 for (i = 2 ; i = n; i++ ){ if (f[i] == 0 ) { p[ ++cnt] = i; } for (j = 1 ; j = cnt; j+...

    2018-06-17 23:43:40

  • 【菜鸟玩Linux开发】在C++里操作MySQL

    MySQL是一个的开源关系型数据库,对于服务端开发来说是一个优秀的选择。本篇内容将介绍如何在C++程序里操作MySQL数据库。 阅读本篇内容之前你需要先了解以下知识: C++编译链接基本原理 make相关知识 SQL基础知识和CRUD基础操作能力 一. MySQL在CentOS下的安装 这部分...

    2018-06-17 23:43:37 下载mysqlsql基础

  • C++ STL简述

    ...

    2018-06-17 23:43:37

  • Gym 101102C---Bored Judge(区间最大值)

    题目链接 http://codeforces.com/gym/101102/problem/C problem description Judge Bahosain was bored at ACM AmrahCPC 2016 as the winner of the contest had the first rank from the second hour until the end of the contest. Bahosain is studying the results...

    2018-06-17 23:43:31

  • 函数声明和函数定义中的默认参数浅析

    默认参数是存在于函数的声明中,还是函数的定义中呢? 我在VS6.0和VS2008下做了如下实验,并做出了简单的总结,有不足或者不准确的地方,欢迎大家拍砖,我会及时修正相关内容。 实验一:默认参数不能同时存在于函数声明和函数定义中。#include iostream #include tchar...

    2018-06-17 23:43:34

  • 2013 Asia Changsha Regional Contest---Josephina an

    题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=4800 Problem Description A role-playing game (RPG and sometimes roleplaying game) is a game in which players assume the roles of characters in a fictional setting. Players take responsibility for ac...

    2018-06-17 23:43:31

2