5 lines
128 B
C++
5 lines
128 B
C++
#include<iostream>
|
|
char *sPtr; //存放字符串的指针
|
|
s="哈哈"
|
|
sPtr = new char[strlen(s)+1];
|
|
strncpy(sPtr,s;
|