Hi friends.. Last day at school my teacher gave the following code.. But it is not working.. 16 errors.. I am a beginner in C++ .I badly need your guidance a help in finding the errors... the for loops is all wrong.. To be frank I don't understand the working of this program.. please help me understand it,wont you?
Buddy.. the problem is that I don't understand the first part of the code,ie the for loop and len.. what is line k? please please help me...
then i will format it with braces and all
Now add a few (not ALL) of your lines of code for the loop body, and try to compile it again.
Also learn to put { } on ALL your for loops, while loops, if statements and switch/case statements. It'll save you from spending ages finding yet another stupid bug because the code did what you asked it to, not what you thought you wanted.
the funcion gets does the job of taking the data in a line
i have not use cin.getline so i cant tell about that and the i in ur program is wrong it should be k as in my program
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.