Re: [Dev-C++] How i convert a char matrix to int matrix ?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2003-12-17 09:31:04
|
Simple - you can't since a char and an int have different sizes.
/Per W
On Wed, 17 Dec 2003 hu...@cl... wrote:
> Hei all,
> i have this matrix :
>
> char matrix[5][5] =3D
> {{'0','0','0','0','0'},
> {'0','0','0','0','0'},
> {'0','0','0','0','0'},
> {'0','0','0','0','0'},
> {'0','0','0','0','0'}
> };
>
> and i have this function :
>
> void show_matrix(int m[5][5))
> {
> int i,j;
>
> for(i=3D0;i<5;i++)
> {
> for(j=3D0;j<5;j++)
> {
> printf("%c ",m[i][j]);
> }
> printf("\n");
> }
> }
>
> this function receives a int matrix and i have a char matix,
> how i call this function with a char matrix ??
>
>
> Thanks
>
> Clix Rapidix - Aumente at=E9 6X a velocidade da sua Internet Adira em htt=
p://acesso.clix.pt e comece logo a navegar
> =A0 ------------------------------------------------------- This SF.net e=
mail is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or jus=
t sharpen your
> skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the=
bash shell to sys admin. Click now!
> http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick ____________=
___________________________________ Dev-cpp-users mailing list
> Dev...@li... TO UNSUBSCRIBE: http://www23.brinkste=
r.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev=
-cpp-users
>
|