PDA

View Full Version : Help needed to find a word in multiple file



aurora
10th October 2011, 06:45
Hello...
I'm new to Qt, I needed a program to find a word in multiple file. The parsing must be done using regular expression. Please help me

ChrisW67
10th October 2011, 07:15
Homework assignment?

QFile (certainly), QTextStream (perhaps), QRegExp (required) and a smattering of standard C++.

aurora
10th October 2011, 08:06
ya...:) thank u.... actually doing project on Qt, learning now and i wrote code in perl....but needed help in qt

Added after 13 minutes:

Can i get some more detail please.....i'm not able to understand it....

SixDegrees
10th October 2011, 08:47
Read the documentation for the classes mentioned earlier; it should take no more then 15 minutes to figure out what they do and how to use them.

ChrisW67
10th October 2011, 09:21
Can i get some more detail please.....i'm not able to understand it....
Which bit of "it" don't you understand? Which bits do you understand?

What does your proposed program look like in pseudo-code? Have you broken it into smaller components? What sort of functions do you need to complete the task? Do any of them sound like they might relate to the classes above?

aurora
10th October 2011, 09:30
Which bit of "it" don't you understand? Which bits do you understand?

What does your proposed program look like in pseudo-code? Have you broken it into smaller components? What sort of functions do you need to complete the task? Do any of them sound like they might relate to the classes above?

my task is to write a program with GUI,which accepts list of file names and a keyword and displays all the lines in those file which has that key word.......
Please guide me...how can i write code for this..? what are the headers i should include?

wysota
10th October 2011, 09:39
Sorry to be blunt but so far it seems you want us to write the project for you. It doesn't work this way, especially if that's your school assignment (I don't believe any real project would focus on reimplementing 'grep'). You need to develop an idea on how to solve your problem, come up with an algorithm and then we can try to help you improve your approach and suggest ways of coding it using Qt. We won't teach you C++ here, we won't teach you programming here. Present a list of steps that you think your program should implement and then we'll comment it.

aurora
10th October 2011, 09:47
ok thank u