hi every body. well i am a new member and i hope that i am doing things the right way . well my problem is that i am a first year students and obvoisly i am studying c++. but i got an assignmet to do. i wrote the code but i just dont know where the problem is. please help me out. i have tried to do the programme in different ways but still it isnot working properly. can i mail you the c++ code and please can you clear me about what the problem is thank you very much for kind coorporation. by the way your web site is an extremely good one and very objectuve and helpful. good luk and keep it up

Recommended Answers

All 4 Replies

i already saw ur program.... u miss a curly braces after ur getch();.....
i solve 1 problem but wat is this "clrscr();" ??? it is clear screen ??? if it is ..... it should be system("cls");

clrscr() is a custom extension introduced by MSC.

>if it is ..... it should be system("cls");
No it shouldn't. Then you would add two problems to already nonportable code. If a screen clear is warranted, then it should be changed to something that the implementation supports, preferrably by doing something like this to make porting easier in the future:

void clear_screen()
  // Some nonportable solution similar to clrscr()

That way you can call clear_screen rather than the nonportable function and any changes are localized to that function.

I do not understand, why are you using similar set of code time and again..???
Moreover, you have mixed the features of C & C++. Try making it an object oriented one if you are creating a .cpp file. Other problems have already been solved in previous replies.

- Anurag.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.