Getting specific info from definitions depending on given variables

Discussion in 'C++' started by dkaksl, Sep 28, 2011.

  1. dkaksl

    dkaksl Guest

    I had an idea for a program that would require getting a specific word or sentence from a list, and was wondering if there was a handy way to do it the way I had in mind.

    So say I have 100 words and each word has 3 conjugations. The word and conjugation are picked by two numbers, for instance 99 and 2. 99 and 2 would give the last word and its 3rd conjugation. I thought I could do the word selection with something like

    x=99;
    y=2;

    data[0]=word0;
    .
    .
    data[98]=word98;
    data[99]=word99;

    would it be possible to define three conjugations for each word like the example above? Like

    data[0]=word0conjugation0, word0conjugation1, word0conjugation2;
    .
    .
    .
    data[98]=word98conjugation0, word98conjugation1, word98conjugation2;
    data[99]=word99conjugation0, word99conjugation1, word99conjugation2;

    and then the value for x would give the word and the value for y would give the conjugation? Am I making sense? Is this possible?

    PS, no idea where to post this :S any help or pointing me in the right direction appreciated.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice