Sponsored Content
Top Forums Programming Traversing member of structure of vector C++ Post 302922688 by yifangt on Monday 27th of October 2014 06:23:59 PM
Old 10-27-2014
If I turned on Line 90a~e, I got output:
Code:
Found substring!		seq3	ATCGATATATAT	 vs. 	seq4	ATATATATCGATCG
Found substring!		seq4	ATATATATCGATCG	 vs. 	seq7	CGCGCGCGCGCGCG
Found substring!		seq7	CGCGCGCGCGCGCG	 vs. 	seq1	ATCGATCGATATATATATATATAT
Found substring!		seq7	CGCGCGCGCGCGCG	 vs. 	seq6	ATCGATCGCGCGCGCGCGCGCGCGC
Found substring!		seq1	ATCGATCGATATATATATATATAT	 vs. 	seq5	ATCGATCGATCGATCGTAGTCGCG

So there is a bug, as seq7 was duplicated !

Last edited by yifangt; 10-27-2014 at 08:48 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying a Directory Structure to a new structure

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)
Discussion started by: jhansrod
8 Replies

2. UNIX for Dummies Questions & Answers

Traversing a file system

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)
Discussion started by: hooj
1 Replies

3. Programming

Accesing structure member:Error:dereferencing pointer to incomplete type

$ gcc -Wall -Werror struct.c struct.c: In function `main': struct.c:18: error: dereferencing pointer to incomplete type $ cat struct.c #include <stdio.h> #include <stdlib.h> #include <string.h> /*Declaration of structure*/ struct human { char *first; char gender; int age; } man,... (3 Replies)
Discussion started by: amit4g
3 Replies

4. Programming

Search attributes in one structure using the values from another structure

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)
Discussion started by: dhanamurthy
3 Replies

5. Programming

Vector Traversing

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)
Discussion started by: dhanamurthy
1 Replies

6. UNIX for Dummies Questions & Answers

script for traversing directory

hi please suggest a korn script which will traverse all subdirectory in the current directory? (2 Replies)
Discussion started by: ilayans
2 Replies

7. Shell Programming and Scripting

Find directory name while traversing subdirectories

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)
Discussion started by: arun_maffy
12 Replies

8. Programming

Traversing in Array of pointers

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)
Discussion started by: ramkrix
12 Replies

9. Homework & Coursework Questions

Problem while traversing directories

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)
Discussion started by: davis7son
1 Replies

10. Shell Programming and Scripting

traversing a string

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)
Discussion started by: nishrestha
4 Replies
STRSTR(3)						     Linux Programmer's Manual							 STRSTR(3)

NAME
strstr - locate a substring SYNOPSIS
#include <string.h> char *strstr(const char *haystack, const char *needle); DESCRIPTION
The strstr() function finds the first occurrence of the substring needle in the string haystack. The terminating `' characters are not compared. RETURN VALUE
The strstr() function returns a pointer to the beginning of the substring, or NULL if the substring is not found. BUGS
Early versions of Linux libc (like 4.5.26) would not allow an empty argument. Later versions (like 4.6.27) work correctly, and return haystack when needle is empty. CONFORMING TO
ISO 9899 SEE ALSO
index(3), memchr(3), rindex(3), strchr(3), strpbrk(3), strsep(3), strspn(3), strtok(3) GNU
1993-04-12 STRSTR(3)
All times are GMT -4. The time now is 11:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy