首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
#include <string.h>
#include <stdio.h>
#include <Windows.h>
#include <string.h>
#include "StdAfx.h"
#define days1800  341
int nongli[]=
{
    /*************************************** 
    * 农历1800-2100年大月小月与闰月 * 
    * (连同111个闰月在内共3723个月) * 
    * 公元1800-01-01为腊月(大)初七 * 
......................
阅读全部 | wp231957 贴于 2013年1月11日 10:06     hide bbsi
#include <string.h>
#include <stdio.h>
#include <Windows.h>
#include <string.h>
int nongli[]=
{
    /*************************************** 
    * 农历1800-2100年大月小月与闰月 * 
    * (连同111个闰月在内共3723个月) * 
    * 公元1800-01-01为腊月(大)初七 * 
    * 公元1800-01-25为农历正月初一 * 
    ***************************************/ 
......................
阅读全部 | wp231957 贴于 2013年1月10日 23:05     hide bbsi
#include <string.h>
#include <stdio.h>
#include <Windows.h>
#include <string.h>
#define leap(y) (y%4==0&&y%100||y%400==0) 

char days[]={0,31,28,31,30,31,30,31,31,30,31,30,31}; 
char *xq[]={"日","一","二","三","四","五","六", "七","八","九","十","冬","腊" }; 

struct date{ int year,month,day; };
typedef struct 

......................
阅读全部 | wp231957 贴于 2013年1月10日 16:27     hide bbsi
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 
 公历日期与农历日期的相互转换程序  
 【极限范围】1800-1-25~2101-1-28  
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ 
#include<stdio.h> 
#include<string.h> 
#define leap(y) (y%4==0&&y%100||y%400==0) 
char days[]={0,31,28,31,30,31,30,31,31,30,31,30,31}; 
char *xq[]={"日","一","二","三","四","五","六", 
 "七","八","九","十","冬","腊" }; 
struct date{ int year,month,day; } 
d1={ 1800,1,25 },/*阴历1800正月初一*/  
......................
阅读全部 | wp231957 贴于 2013年1月10日 15:48     hide bbsi
void ClisttestDlg::OnBnClickedOk()
{
    // TODO: 在此添加控件通知处理程序代码
    //CDialogEx::OnOK();
    // TODO: 在此添加控件通知处理程序代码
    CFileDialog dlg(true);
    if (dlg.DoModal() == IDOK)
    {
        //this->MessageBox(L"选择的文件地址:" + dlg.GetPathName() + " | 选择的文件名:" + dlg.GetFileName() ,
        //    L"提示:",MB_OK);
    }
    else
......................
阅读全部 | wp231957 贴于 2013年1月9日 22:25     hide bbsi
#include<stdio.h>
int main()
{
    int a[]={1,2,3,4,5};
    int *p=a;
    printf("%d,%d,%d,%d,%d,%d,%d,%d\n",*p,*(++p),(*p)++,*p,*p--,--(*p),*p);
}
输出的结果为啥第一个是2
阅读全部 | zyd550153 贴于 2013年1月9日 20:56     hide bbsi
// listtestDlg.cpp : 实现文件
//

#include "stdafx.h"
#include "listtest.h"
#include "listtestDlg.h"
#include "afxdialogex.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

......................
阅读全部 | wp231957 贴于 2013年1月9日 14:37     hide bbsi
// listtestDlg.cpp : 实现文件
//

#include "stdafx.h"
#include "listtest.h"
#include "listtestDlg.h"
#include "afxdialogex.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

......................
阅读全部 | wp231957 贴于 2013年1月9日 11:29     hide bbsi
<?php
 $ad[1]="http://www.19e8.com/"; //页面1
 $ad[2]="http://www.google.com.hk/search?q=%E7%94%B5%E8%84%91%E7%BB%B4%E4%BF%AE%E5%86%9B%E5%9B%A2%E4%B8%BB%E6%9D%BF%E7%BB%B4%E4%BF%AE%E5%85%A8%E9%9B%86&hl=zh-CN&newwindow=1&safe=strict&tbo=d&ei=3u_HUK-vGoijiAexloDIBA&start=130&sa=N"; //页面2
 $ad[3]="http://www.google.com.hk/search?hl=zh-CN&newwindow=1&safe=strict&tbo=d&q=%203d%20max%E7%B2%92%E5%AD%90%E6%B1%87%E8%81%9A";  //页面3
 $ad[4]="http://www.google.com.hk/search?client=aff-360daohang&hl=zh-CN&ie=utf-8&newwindow=1&q=%E7%90%86%E5%8F%91%E5%85%A5%E9%97%A8%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B"; //页面4
$ad[5]="http://www.google.com.hk/search?q=%E5%AE%8C%E7%BE%8E%E5%8F%B6%E5%AD%90%E7%BC%96%E7%BB%87%E8%A7%86%E9%A2%91%E7%AC%AC%E4%BA%94%E5%8D%81%E5%85%AB%E9%9B%86&ie=UTF-8&oe=UTF-8&hl=zh-hans&client=safari&hl=zh-CN&sourceid=cndr"; //页面5
$ad[6]="http://www.google.com.hk/search?hl=zh-CN&newwindow=1&safe=strict&tbo=d&q=3dmax%E7%89%87%E5%A4%B4%E5%8A%A8%E7%94%BB%E6%95%99%E5%AD%A6&btnG=Google+%E6%90%9C%E7%B4%A2"; //页面6
 $out=rand(1, 6);//随机取得这5个页面的一个,有几个就写几, 此例有5个页面,就写 5 
 header("location:$ad[$out]"); //在需要的地方调用本句,页面转向
?>
阅读全部 | liliang456 贴于 2013年1月8日 14:51     hide bbsi
用fopen()函数来读写文件  很多使用过Turbo C的朋友喜欢用fopen()函数来读写文件,在Visual C++环境中您也可以使用fopen()来读写文件。而且您还可以使用Visual C++中的标准的打开文件对话框,这样可以使选取读写文件的路径更方便。具体的做法是这样的。

  首先您需要使用到MFC基本类库,在您原有的Visual C++中加上一个由CFileDialog类派生的新类,例如是CMyFileDialog,然后用这个新类定义一个对象,例如是:myDlg,使用这个对象的DoModal()方法,就可以呼出打开文件的对话框。这样,您只要把被选中的路径名及文件名传送给fopen()函数就可以打开读写这个文件了。

CMyFileDialog myDlg(true);
定义一个对话框对象
myDlg.DoModal();
呼出打开文件对话框
CString fileName;
定义一个Cstring类型的字符串来存储文件的路径及文件名
fileName=myDlg.GetPathName();
得到文件的路径及文件名
......................
阅读全部 | wp231957 贴于 2013年1月8日 14:38     hide bbsi
上一页 270 271 272 273 274 275 276 277 278 279 下一页