Hello frieds,
Im new to this group and C/C++ too!  I'm stuck with this
code and can't understand how a three dimensional arrray
is used as 2D aray.
Let's have a look,

                 *   // This translate  ENglish to German *

*#include <stdio.h>*
*#include <string.h>*

*    char words[][2][40] = {*
*        "dog", "hund",*
*        "no", "nein",*
*        "year", "jahr",*
*        "child", "kind",*
*        "i", "ich",*
*        "drive", "fahren",*
*        "house", "haus",*
*        "to", "zu",*
*        "", ""*
*        };*
*    *
*int main()*
*{*
*    char english[80] ;*
*    int i ;*

*    printf("Enter English word: ");*
*    gets(english) ;*

*    i = 0 ;*
*    while( strcmp(words[i][0], "") ){*
*        if (!strcmp(english, words[i][0]) ) { // How a three dimensional
array is used as 2D here & if  i = 0 initially and  i cant understand this
line totally
**            printf("German translation : %s ", words[i][1] ); *
*            break ;*
*        }*
*        i++ ;*
*    }*
*    *
*    if(!strcmp(words[i][0], "") )*
*        printf("Not in dictionary\n") ;*

*    return 0 ;*
*}*

Anyone help this kid?

thanx
-- 
                           ShishiR
             http://DewsWorld.741.com

/////////////////////////////////////////////////////////////////////////////////
///////////////////////////সকল সৃষ্টি সুখী হোক/////////////////////////////
/////////////////////////////////////////////////////////////////////////////////


[Non-text portions of this message have been removed]

Reply via email to