Hi...
i hope u guys can help me......
im quite newbie and i have a problem...ive ask around but no one knows...
i want to read a test.mdl and then detect what it say and then process the content....
this test.mdl file if ur open it will look like text file....
what i do is im using fgetc(ch) and it doesnt work but other recommended using fgetstring and ive done but there result is not as ive expected....
it dont want to detect the string....
this is the example....
the file content in test.mdl file
((procedures first) common test
((funtion one)
(methode 1)
(methode 2)
(end function))
(end procedure))
i want only to extract
((funtion one)
(methode 1)
(methode 2)
(end function))
from the full system and the result should be like below
function one
methode 1
methode 2
end function
the reason is that i can know what and how many methode contain in function one in the test.mdl file...
im using the fgets function and it dont comes out quit well...it doesnt go to second line and it dont detect the string at all as i want to....the condition is like below
if (the text) = "function one" then fprintf the whole string until it find the (end function) string
please help me if u gurus, seniors, have any idea or solution how to code....im using c++, am very glad i anyone can help me on this problem....