Hello,
I want to loop thru a vector composed of many entries as structure, which contains sequenceID and sequence. At looping, delete any structure if the sequence is a perfect-match substring of another sequence of any other structure, so that the resulted vector contains only unique sequences.
I have difficulty for the parts to access the sequence as vector member by iterator, and to compare the sequences as structure member thru iterator.
Debugging for a while, finally code was compiled without error!
But I am expecting
Likely Line 90 & 91 are of problem, but not quite sure.
Two questions I have here:
1) Line 90 Find substring from masterstring, as not all the entry are substring of the others. string.find() function seems return a pointer, but there is no error here. Why?
2) Line 91 remove the vector member (structure) thru iterator , is this the right way?
Google's for a while, could not get a clear answer.
Thanks a lot!
Last edited by yifangt; 10-28-2014 at 08:05 PM..
Reason: Modifies code
I am writing a script which will read a word and say how many vowels and consonants does the word contain. but i dont know how to traverse a string in shell scripting. if it was in C i'd have done something like this:
cout<<"plz enter the word"<<endl;
cin>>word;
int consonants, vowels;... (4 Replies)
I was given to create a backup of all files in a given directory(command line argument) into say /home/vishal/back and the back up files must be accordingly to the extension of the file i.e pdf files are saved in back/pdf doc files back/doc etc . I gave a recursive function to traverse through the... (1 Reply)
Please find the below program. the requirement and description of the program also given:
ganesh@ubuntu:~/my_programs/c/letusc/chap9$ cat fa.c.old
/* Program : write a program to count the number of 'e' in thefollowing array of pointers to strings:
char *s = {
"We will teach you how... (12 Replies)
Hi,
I have a parent directory in which I have sub directories of different depth
/usr/usr1/user2/671
/usr/usr1/672
/usr/user2/user1/673
/usr/user2/user3/user4/674
And I need the names of all the directories that which starts only with 6 in a file.
Thanks, (12 Replies)
Hi
i have the following structure
struct S
{
char Mod_num;
char val;
char chr_nm_cd;
}
I am reading a 2GB file and inserting into the structure and writing into a vector.
I feel like only vector will be a right option. I tried with multimap but it is memory intensive and hence i... (1 Reply)
Hello Groups
I am trying to find out ways of comparing a value from a 'c' structure to a value in another 'C' structure. the 'C' structure can be a List or liked list as it contains lot many records.
if we loop it in both the structures it is going to consume time.
I am looking for a simple... (3 Replies)
I'm pretty new at this UNIX stuff, and this may be a simple question but I'm kind of stuck :confused:
Let's say I have a large directory structure of .essay files,
where I saved all of the essays that I did over the last few years. Not all of the .essay files are in the same directory (all... (1 Reply)
Hi all
Is it possible to copy a structure of a directory only.
e.g.
I have a file with the following entries that is a result of a find :-
/dir1/dir2/file.dbf
/dir1/dir2/dir3/file1.dbf
/dir1/file.dbf
I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)