yeah there were extra \n in the code and now , there is some error in the print statement , as the manipulation functions says word is found, but the print function says no such file or directory.

void getFname(string path,string str[], int & position)
{
	string t=(path+"*.txt");
	cout <<"Path "<<t<<endl;
	if((hfile=_findfirst(t.c_str(),&c_file))==-1L)
	{}
			
	else
	{
                position=0;
		//str[0]=path+c_file.name;
		//position++;    [SEE BELOW]
			
				
		do{				
					
			str[position]=path+c_file.name;
			position++;
					
					
			}while(_findnext(hfile,&c_file)==0);

I made a mistake, you need to take out those lines too as it's accomplished in the first pass of the do/while. Otherwise you're doubling your first file.

There's something wrong with the program that it doesn't find the tokens in anything after the first file. Have you run across this?

I have made the test folder, and also running the code for only one file, but still i havent managed to get the output, the manipulation function says that the word is found, but the print function says there is no such file or directory.

Omg, i dint belive i managed to get the output thanks Jonsca, for the help !!
The problem was with the return statements, i was working with the loops and when ever it encounters a return statement it goes out of loop.And there was a problem with the print, as i wasnt providing it the right path.
Thank you again , !!

commented: Nice finish with it! +2

Very good that you were able to finish all that debugging on your own.
There's one other hitch where after it reads one file it stops. I solved the problem by having a "new" my_file for each trip through the loop (there's probably a way to reset the pointer but I had tried a my_file.seekg(0); which did not work). So, just something to watch out for -- just replace the my_file.open(path.c_str()); with fstream my_file(path.c_str()); on line 87 of your full code listing a few posts back. It's likely there's a more proper method of doing this.

Very good that you were able to finish all that debugging on your own.
There's one other hitch where after it reads one file it stops. I solved the problem by having a "new" my_file for each trip through the loop (there's probably a way to reset the pointer but I had tried a my_file.seekg(0); which did not work). So, just something to watch out for -- just replace the my_file.open(path.c_str()); with fstream my_file(path.c_str()); on line 87 of your full code listing a few posts back. It's likely there's a more proper method of doing this.

Ok, i will make the changes, plus jonsca , i want to make User Interface , like windows sort of application , i have never worked with it, can you help me how to get started.

I hope you are joking. :) But if you're not, you're going to have to do some homework. What windowing APIs/toolkits do you have access to? You can do Win32 or MFC or Qt or wxWidgets (and there are probably 3-4 more). It's a fairly big commitment and learning curve any way you slice it. So in earnest find out what's available to you -- are you running Visual Studio? You'll need the full version to do MFC but you can do Win32 on the Express...etc.

Ok =) Yeah i believe that requires time , Now i want to increase the readability of my program, I want to move the axis , so that the data appears at the center of program.
Can you help me with this ?

Yes, that's more doable. To take someone from 0 to 60 in GUI programming would take a tremendous amount of effort on everyone's part. I prefer practicing it in C# anyway where there's code completion. :)

Try some of the spacing yourself with the setw function to control where your columns end up. Of course there's always toss an '\n' here and there for the vertical spacing.

If you're really set on a lot of precise text placement you should look into ncurses (I forgot if you are on PC or *nix). If you're on *nix check and see if it's available for your distro or already installed, for PC check out something like pdcurses. I have no experience with either but it could be a heavy commitment with that too.

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.