终极解决方案:
VS2010在经历一些更新后,建立Win32 Console Project时会出“error LNK1123” 错误,解决方案为将 项目|项目属性|配置属性|清单工具|输入和输出|嵌入清单 “是”改为“否”即可,但是没新建一个项目都要这样设置一次。
在建立VS2010 Win32 Project项目时,按照上面解决方案依然发生了“error LNK1123”错误,经过上网查资料,解决方案为:
第一步:与上相同。
第二步:将 项目|项目属性|配置属性|连接器|清单文件|嵌入清单 “是”改为“否”。
第三步:一般计算机经过上两步设置就能解决问题了,但是如果还有问题...
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
mmo1: TMemo;
mmo2: TMemo;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sen...
uses DateUtils
●function DateOf(const AValue: TDateTime): TDateTime;
描述:
使用 DateOf 函数用来把一个 TDateTime 类型的变量转变成一个只带有日期的 TDateTime 类型变量。
例如:
showmessage(DateTimetostr(dateof...
时间函数在窗体中可以直接使用。如果是无窗体的还是需要声明,下面是实现对象。
program Project1;
uses
Messages, SysUtils,Dialogs;
{$R *.res}
function MyDateTime(StartDate, EndDate, Preaching: TDateTime): Boolean;
begin
Result:=false;
if (Preaching>=StartDate)and(Preaching>=EndDate) then
Result:=true;
end;...
program Project1;
uses
Windows, Messages, SysUtils,
Dialogs, StdCtrls,Tlhelp32,shellapi; //DateUtils 用时间需要定义
{$R *.res}
function CheckTask(ExeFileName: string): Boolean; //监视进程函数
const
PROCESS_TERMINATE=$0001;
var
ContinueLoop: BOOL;
FSnapshotHandle: THandle;
FProcessEntry32: TPro...
本文主要列举两张和三张表来讲述多表连接查询。 新建两张表: 表1:student 截图如下: 表2:course 截图如下: (此时这样建表只是为了演示连接SQL语句,当然实际开发中我们不会这样建表,实际开发中这两个表会有自己不同的主键。) 一、外连接 外连接可分为
本文主要列举两张和三张表来讲述多表连接查询。
新建两张表:
表1:student 截图如下:
表2:course 截图如下:
(此时这样建表只是为了演示连接SQL语句,当然实际开发中我们不会这样建表,实际开发中这两个表会有自己不同的主键。)
一、外连接
...
#include <iostream>
#include <string>
using namespace std;
class Date
{
int mo,da,yr;
char *month;
public:
Date(int m=0,int d=0,int y=0);
~Date();
Date& operator=(const Date&);
void display() const;
};
Date::Date(int m,int d,int y)
{
static char *mos[]=
{
"Janua...
#include<iostream>
using namespace std;
class CPoint
{
public:
CPoint(int x=0,int y=0);
int SetTemp();
void Print();
void Print() const;
private:
int m_x;
const int m_y;
static const int m_z;
int m_temp;
};
void main()
{
const int ARRAY_SIZE=5;
CPoint *pCPoint;
pCPoi...
//源码和程序下载地址在页面底部
//这几天写的c语言程序,由于使用了easyX里的图形函数,
//而easyx必须要求文件名为cpp.里面的内容为纯c
#include<graphics.h>
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<tchar.h>
#define S1 60 //初始位置(S1,S1)
#define S2 20 //单位大小
const int ...
#include <iostream>
#include <string>
using namespace std;
class Internet
{
public:
Internet(char *name,char *url)
{
Internet::name=new char[strlen(name)+1];
Internet::url=new char[strlen(url)+1];
if(name)
{
strcpy(Internet::name,name);
}
if(url)
{
strcpy(Int...
在单位有时用内网办公,有时又要上外网,由于内网和外网的ip设置不一样,这样每次来回设置都很麻烦,于是很多切换ip的软件诞生了,不过通常我们只需在二个ip自由切换,所以写个批处理文件就可以了。
在家用路由上网通常都是自动获取ip模式
于是把下面存为:外网.bat
cmd /c netsh -c interface ip set address name="本地连接" source=dhcp
cmd /c netsh -c interface ip set dns name="本地连接" source=dhcp
...
其实简单的命令就是运用windows 的NET命令来映射网络驱动器
比如net use z:\\192.168.0.100\data 123 /user:123
表示将局域网内其中一台IP为:192.168.0.100的机器里的共享文件夹data映射为本地的Z:盘,通过在CMD运行中运行命令,即可在本地产生一个z:盘,但前提是192.168.0.100这个机器里事先共享一个DATA文件夹,并在其中放上我们要用的VF数据库。此时操作如同在本地操作一样。
另外数据库必须是共享式的而不是独占的,比如Set Exclusive off表示共享操作。
...
SELECT * FROM 表名 WHERE 字段名 IN (SELECT 字段名 FROM 表名 GROUP BY 字段名 HAVING count(*)>1) order by 字段名
只要将程序代码中表名和字段名换成自己需要的就行
class Shape
{
public:
Shape() {}
~Shape() {}
virtual float GetArea()=0;
virtual float GetPerim()=0;
};
class Circle:public Shape
{
public:
Circle(float radius):itsRadius(radius) {}
float GetArea()
{
return 3.14*itsRadius*itsRadius;
}
float GetPerim()
{
return ...
#include <iostream>
using namespace std;
typedef char string80 [80];
class Data
{
public:
Data() {}
Data(int y, int m, int d)
{
SetData(y,m,d);
}
void SetData(int y,int m,int d)
{
Year=y;
Month=m;
Day=d;
}
string80 &GetStringData(string80 &Data)
{
spr...
1.change the DOS title
windows+r->cmd->title [what you want]
2.change the DOS prefix
windows+r->cmd->prompt [what you want]
3.change the DOS background's color
windows+r->cmd->color [bf]
(PS:b is representing background's color,you can input the code of...
#include <iostream>
using namespace std;
class CPoint
{
public:
int x1;
int y1;
void output();
CPoint();//构造
CPoint(int x2,int y2);//重载
~CPoint();//析构
private:
int x2;;
int y2;
int *pCount;
};
void CPoint::output()
{
if(pCount)
(*pCount)++;
else
{
pCount=new ...
#include <iostream>
using namespace std;
class point
{
private:
double fx,fy;
public:
point();//不带参
point(double fx,double fy);//带参
void showpoint();
};
point::point()
{
fx=0.0;
fy=0.0;
}
point::point(double x,double y=5.0)
{
fx=x;
fy=y;
}
void point::showpoint()
{
...
#include <iostream>
#include <string>
using namespace std;
class Cbook
{
private:
char *m_pczName;
int m_nPages;
int m_nEdition;
public:
void GetBookName(char *pName);
int GetTotalPages();
int GetBookEdition();
private:
void SetBookName(char *pName);
void SetTotalPages(int ...
1、对象的创建与关闭
*******************************
eole=CREATEOBJECT('Excel.application') && 创建Excel对象
eole.Workbooks.add && 添加新工作簿
eole.Worksheets("sheet3").Activate && 设置第3个工作表为激活工作表
eole...