HELLO.CPP
资源名称:ds1-3.rar [点击查看]
上传用户:chaiyuqiu
上传日期:2022-08-03
资源大小:27k
文件大小:0k
源码类别:
数据结构
开发平台:
C/C++
- #include <stdio.h>
- #include <string.h>
- #include "hello.h"
- char *hello(char *name) {
- char *value = new char [9+strlen(name)];
- sprintf(value,"hello,%s.",name);
- return value;
- }
- #include <iostream.h>
- #include "hello.h"
- void main(){
- cout << hello("world") << endl;
- }