Created
April 10, 2013 10:15
-
-
Save ZhangBowen/5353428 to your computer and use it in GitHub Desktop.
taobao ngxin issue #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstring> | |
using namespace std; | |
struct test | |
{ | |
int len; | |
char * data; | |
}; | |
test create(char *data) | |
{ | |
test ans; | |
ans.len=strlen(data); | |
ans.data=data; | |
return ans; | |
} | |
int main() | |
{ | |
test temp; | |
temp =create("hello world"); | |
printf("%s\n",temp.data); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment