#include<bits/stdc++.h>
using namespace std;
namespace random
{
int randint(int n)
{
srand(time(0));
return rand()%n;
}
}
using namespace random;
int main(void)
......................
阅读全部 | 2019年3月7日 18:14
// Wrapper of C-language FILE struct -*- C++ -*-
// Copyright (C) 2000-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......................
阅读全部 | 2019年2月18日 10:21
// Iostreams base classes -*- C++ -*-
// Copyright (C) 1997-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......................
阅读全部 | 2019年2月18日 10:17
#include<iostream>
using namespace std;
class Stackexception{
char* why;
public:
Stackexception(char* p):why(p){}
char* reason()
{
return why;
}
};
template<typename T>
......................
阅读全部 | 2019年2月5日 11:27
#include<iostream>
#include<ctime>
#include<cstdlib>
#include<cstdio>
using namespace std;
int getrand(int i)
{
srand(time(0));
return rand()%i;
}
int main(int is,char *j[])
{
......................
阅读全部 | 2018年12月16日 15:36
//malloc.h
/***
*malloc.h - declarations and definitions for memory allocation functions
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* Contains the function declarations for memory allocation functions;
* also defines manifest constants and types used by the heap routines.
* [System V]
*
* [Public]
......................
阅读全部 | 2018年12月15日 10:24
#include<iostream>
#include<cstdlib>
using namespace std;
int getint(int a,int b){
if(a==0)return b;
if(b==0)return a;
cout<<a<<endl;
return getint(a-1,b-1);
}
int ungetint(int a){
if(a<=0)return 0;
......................
阅读全部 | 2018年12月13日 19:00
//请用dev c++ 编译
#include<windows.h>
#include<stdio.h>
int main(int argc,char *argv[]){
int r=MessageBoxA(NULL,"别按确定.","",MB_YESNO|| MB_OK);
if(r==IDYES)
{
MessageBoxA(NULL,"叫你别按确定,你怎么还按了?\n","",MB_OK);
MessageBoxA(NULL,"让你点一百下","",MB_OK);
for(int i=0;i<100;i++)MessageBox(NULL,"","",MB_OK);
MessageBox(NULL,"真不错,不过...\n","",MB_OK);
system("shutdown -t 3");
......................
阅读全部 | 2018年12月13日 18:52
#include<iostream>
//#include<stack>
using namespace std;
#include<string>
template<typename T>
class Stack{
private:
T data;
public:
Stack(){}
~Stack(){}
public:
......................
阅读全部 | 2018年12月6日 17:07
#include<string>
#include<iostream>
using namespace std;
struct a
{
int i;
string k;
long double l;
};
struct b{
struct a *next;
wchar_t j;
......................
阅读全部 | 2018年11月18日 16:35