添加重要的命名空间:using
System.Runtime.InteropServices;先建立结构相同(char长度相同)的Struct类型用于转换:[StructLayout(LayoutKind.Sequential,
Pack = 1)] public struct Employe...
分类:
其他好文 时间:
2014-05-26 23:25:14
阅读次数:
302
创建表时,必须为表的各个列指定数据类型。如果实际的数据与该列的数据类型不相匹配,则数据库会拒绝保存。如为学生指定出生日期为“1980-13-31”。
在Oracle中,常见的数据类型有: 字符串:字符串分为定长类型char和变长类型varchar2。 数字:整数 number(整数位),小数 ...
分类:
数据库 时间:
2014-05-26 22:55:47
阅读次数:
312
#include#includeusing namespace std;struct G{float
W;float V;char N[10];}g[100];void wenzi(int & m){cout>m;}int main(){int
M;wenzi(M);int i,j,k,p=0,A[...
分类:
其他好文 时间:
2014-05-23 04:08:15
阅读次数:
240
【7.4】 1 #include 2 #include 3 #include 4 using
namespace std; 5 #define MAXN 100 6 7 typedef struct node{ 8 char data; 9 node
*lchild;10 ...
分类:
其他好文 时间:
2014-05-23 03:26:20
阅读次数:
260
std::string转NSString
std::string _string("hello");NSString *str= [NSString stringWithCString:_string.c_str() encoding:[NSString defaultCStringEncoding]];
NSString转std::string
NSString * ...
分类:
其他好文 时间:
2014-05-23 02:24:50
阅读次数:
201
#include "STC12C5A.H"
#define TIMER_RELOAD() {TL0=0x00;TH0=0xC4;}//使能T/C
初始10ms
#define MAX_TASKS 2 //任务槽最大个数.
unsigned char idata task_stack[MAX_TASKS][2];//任务堆栈. PC指针为16位,需2个字节task_st...
分类:
编程语言 时间:
2014-05-23 00:03:19
阅读次数:
341
² 字符函数
1. replace( 字符串1,字符串2,字符串3)
replace( char, search_string, replace_string)
功能:在“字符串1”中搜索“字符串2”,并将其替换为“字符串3”。
例如下面的命令是将所有员工名字中出现的”A”替换为”中国”。
SQL>selectreplace(ename, 'A', '中国') fro...
分类:
数据库 时间:
2014-05-22 22:35:22
阅读次数:
450
--创建表
createtable JOBTEST (
IDVARCHAR2(50)
primarykey,
NAMEVARCHAR2(20),
AGE NUMBER(3) )
--创建存储过程
createorreplaceprocedure
jobtestprocedure
isbegin
insertinto jobtest
values(to_char(s...
分类:
数据库 时间:
2014-05-22 18:52:39
阅读次数:
359
1 #include 2 3 4 using namespace std; 5 6 #define
MAX 255 7 8 typedef unsigned char BYTE; 9 10 typedef BYTE String[MAX+1]; 11 12
bo...
分类:
其他好文 时间:
2014-05-22 15:10:06
阅读次数:
278
#include#includevoid main(){ char a[3]; char*str =
"adgc"; strcpy(a,str); printf("%s ",a);}程序运行的结果为什么是 adgc 呢? a的空间只有3个字符呢
,为什么可以存放str呢?望求解。
分类:
其他好文 时间:
2014-05-22 14:02:13
阅读次数:
265