Newsgroup: comp.lang.c++
Subject: Copying part of a vector element to a string variable
From: "Steph W." <swilks06@...>
Date: Mon, 7 Oct 2013 21:01:42 -0700 (PDT)
I know you can copy a vector to a string by using:
std::string t( v.begin(), v.end() );
But is it possible just to copy apart of a vector element to a string?
For instance if you have a vector that has the following:
S R A
F B 30
M A 49
F M 34
Each line would be an element and each char would be an element inside that element. So could take vector[1][4:5], which be the "30", and just put that into a string variable?
Subject: Copying part of a vector element to a string variable
From: "Steph W." <swilks06@...>
Date: Mon, 7 Oct 2013 21:01:42 -0700 (PDT)
I know you can copy a vector to a string by using:
std::string t( v.begin(), v.end() );
But is it possible just to copy apart of a vector element to a string?
For instance if you have a vector that has the following:
S R A
F B 30
M A 49
F M 34
Each line would be an element and each char would be an element inside that element. So could take vector[1][4:5], which be the "30", and just put that into a string variable?
via Usenet Forums - Usenet Search,Free Usenet - comp.lang.c++ http://www.pocketbinaries.com/usenet-forums/showthread.php?102960-Copying-part-of-a-vector-element-to-a-string-variable&goto=newpost
View all the progranning help forums at:
http://www.pocketbinaries.com/usenet-forums/forumdisplay.php?128-Coding-forums
No comments:
Post a Comment