直接赋值就行了。比好:chara[]="kdjfkdf";CStringstr=a;不过如果是在UNICODE下,不要用char,而用TCHAR不行的我的char数组里面有多个ASCII码为0的字符,直接赋值的话只能得到一部分确实,如果char中有0,复制时会截断。不过就算你有……
分类:
其他好文 时间:
2014-05-01 10:23:15
阅读次数:
299
我的strcat: 1 char *strcat(char *dest,char *src)
2 { 3 char * reval = dest; 4 while(*dest) 5 dest++; 6 while(*src) 7 *dest++...
分类:
其他好文 时间:
2014-05-01 08:59:02
阅读次数:
484
#include#include#includeusing namespace std;int
main(){ int n,i; char a[100000]; cin>>a; sort(a,a+strlen(a)); do{
cout<<a<<endl; }while(next_permut...
分类:
其他好文 时间:
2014-05-01 06:20:37
阅读次数:
368
来自:#include "DDraw.h"class CDDraw{public:void
CleanUp();void DrawDIB(BITMAPINFOHEADER* pBI,char* pData,RECT*rt);BOOL Init(HWND
hWnd,int nWidth,int nHe...
分类:
其他好文 时间:
2014-05-01 05:25:10
阅读次数:
407
#include LRESULT CALLBACK WindowProc( HWND
hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch (uMsg) { case WM_DESTROY:
...
1 保留小数点后两位#include cout const char * spilt="/";char
*p;p=strtok(str,spilt);while(p!=NULL){ //cout
#includesort(Rs.begin(),Rs.end());sort(Rs.begin(),Rs...
分类:
编程语言 时间:
2014-05-01 05:05:45
阅读次数:
409
一、采用tri::function/bind方法实现类成员函数内部调用首先声明函数类型1
std::tr1::function func;在需要调用函数的地方绑定函数 1 switch (flgFun) { 2 case flgSine: 3
func = std::tr1::bind(&C...
分类:
其他好文 时间:
2014-05-01 05:03:39
阅读次数:
346
1。结构的存储分配12printf("%d
\n",sizeof(char));printf("%d \n",sizeof(int));int 类型为4B char 为1B1234567struct
sa{char a;int b;char c;};12345678struct sa{char c;...
分类:
其他好文 时间:
2014-05-01 04:07:14
阅读次数:
350
最近修改页面排版的一些问题,发现关于内容分词换行有两个主要的CSS:word-wrap 和
word-break特别是word-wrap还有个取值break-word,更使得这两个属性容易混淆。先来看看这两个属性的定义和取值吧:word-warp:用来表明是否允许长单词内断句而移至下一行。norma...
分类:
Web程序 时间:
2014-05-01 03:41:37
阅读次数:
529
用c语言实现
#include
#include
#include
using namespace std;
typedef struct node
{
char x;
struct node *next;
}chan;
chan *root = new chan;
char a[100010];
int main()
{
while(scanf("%...
分类:
编程语言 时间:
2014-04-29 13:47:20
阅读次数:
358