January 21st, 2010, 08:22 AM
so.. i found out what the real problem is. i thought that after doing first or second if the search jumps to the third if but actualy after doing first or second if it runs the for again, thus doing...
January 19th, 2010, 04:52 PM
ok. then i must have asked the wrong question. i'm going to reformulate.
why, when i use "Search: " i get answers from other ifs instead of getting only from one if.
and please, do critique the...
January 18th, 2010, 06:47 PM
i guess it's better that way :P
January 18th, 2010, 06:37 PM
here you go
translator.zip - 0.00MB
i hope zshare is alright.
tnx for the interest
January 18th, 2010, 06:12 PM
sorry for the confusion. here is the full code
main.cpp
#include <iostream>
#include "class.h"
using namespace std;
int main()
{
January 18th, 2010, 09:52 AM
theoretically it should work .. but it still doesn't .. it has something to do with the strncmp line. i've changed it with something else and it works how it should. how should i write the strncmp...
January 17th, 2010, 06:28 PM
thanks for the advice. but still doesn't work properly.
here's the output for first if working :
http://img63.imageshack.us/i/firstif.jpg/
and second if working
...
January 17th, 2010, 05:33 PM
for(i=0; i<n; i++)
if ( strcmp ( a[i].word, search_word ) == 0 ) { // (1)
cout << "- - - - - - - - - -" << endl;
cout << a[i].word << ", " << a[i].word_pl <<...