cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
occurrence of string cg in a dna string
occurrence of string cg in a dna string
May 9, 2012 at 2:06pm UTC
kalicha
(42)
hi, i am new to c++. i want to write a program to find the sequence of cg in a dna string. i know we have to find the length and use the loops but i am really confused about subscripting. NEED HELP PLEASE
May 9, 2012 at 2:09pm UTC
Athar
(4466)
Subscripting:
str[i]
Getting the length:
str.length()
Finding a substring:
str.find("cg")
http://www.cplusplus.com/reference/string/string/
May 9, 2012 at 2:13pm UTC
kalicha
(42)
thanks i have the length but can u please explain a bit about subscripting
May 9, 2012 at 3:55pm UTC
Athar
(4466)
http://www.cplusplus.com/reference/string/string/operator%5B%5D/
May 24, 2012 at 2:32am UTC
kalicha
(42)
thanks
Topic archived. No new replies allowed.