This is a discussion on Formatting Output within the C Programming forums, part of the General Programming Boards category; Input:...
Last edited by m0nster; 03-07-2011 at 09:38 PM.
Start getting your code together... work it as far as you can before you get stuck.
If you run into trouble, post your code here and we'll see what we can do...
Well, i am ignoring what user has entered. Suppose, user has entered error free syntax code.
You've to read some of the common things. Store all those things that you want to compare with the file, in an array.
Start comparing them...
You need to indent if.
What you need to do is to check the first paranthesis (opening) and then just one more paranthesis(closing). Indent here and keep using other things, similar to this...
There can be many better solutions at the moment, but actually i got to go, that's why i didn't even read your specification carefully. I hope you will get help till tomorrow, but if you didn't surely i can try to help on this......
now i dont even have a clue
What's the first thing you have to do?
You need the filename of the file to processThen what?
You need to open the file
Break the task down into small steps, write each step in turn...
Pen and paper... make a list.
Eventually you'll run out of steps and the program will be finished.
1) I've simple do this, the problem for the above codes is that I didnt use recursive
2) The codes will only work if there's space between words.
printf("Welcome --- Will NOT work
printf ("Welcome --- Will work
3) I've manually added the number 29 (for for loop) which represent number of words
My question is how to improve my codes so that I use recursive and to avoid problem number 2.
and how to write back to the text file :S
I think I can solve problem number 3 by counting number of words. Please help me with the first 2 problems.
Please explain to me in detail, Im really not that smart and slow learner.
Thank You very much
Last edited by m0nster; 03-07-2011 at 09:39 PM.