|
发表于 2004-5-24 22:08:25
|
显示全部楼层
//对不起啊,我功力浅,用vc给你作罢(我暂时学windows编程)
//这是一个另类解决方法.............................
//注意fuc2()函数....................................
// 123.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream.h"
fuc(char array[])
{
cout << array << '\n';
cout << sizeof array <<'\n' ;
}
fuc2(char *array,int i)
{
cout << i <<'\n';
}
int main(int argc, char* argv[])
{
char array[]="我要学好c语言";
cout << array << '\n';
cout << sizeof array<<'\n' ;
fuc(array);
fuc2(array,sizeof array);
return 0;
} |
|