vecteur en fonction de comment le faire revenir

J'ai une fonction qui doit lire à partir d'un fichier ligne par ligne, la lecture s'arrête dès qu'une ligne ne commence pas par " >' ou'. Il doit stocker les lignes dans le vecteur et le retourner.
C'est code:

    #include <cstdlib>
    #include <iostream>
    #include <string>
    #include <stdio.h>
    #include <fstream>
    #include <vector>

    using namespace std;

    string getseq(char * db_file) //gets sequences from file
            {
                string seqdb;
                vector<string> seqs;
                ifstream ifs(db_file);
                string line;

                //vector<char> seqs[size/3];

                while(ifs.good())
                {
                    getline(ifs, seqdb);
                    if (seqdb[0] != '>' & seqdb[0]!=' ')
                    {
                        seqs.push_back(seqdb);
                    }
                }

            ifs.close();
            //return seqs;

            //return seqs;
            }

    int main(int argc, char * argv[1])
    {
        cout << "Sequences: \n" << getseq(argv[1]) << endl;
        return 0;
    }

Compilateur g++) retourne:

    fasta_parser.cpp: In function std::string getseq(char*)’:
    fasta_parser.cpp:32: error: conversion from std::vector<std::basic_string<char, `std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >’ to non-scalar type std::string requested`

Quelqu'un a une idée?

Edit:
Comme Skurmendel demander, je suis l'ajout de code entier de mémoire à cause de violation de la sécurité après

l'exécution de code compilé:

#include <cstdlib>
#include <iostream>
#include <string>
#include <stdio.h>
#include <fstream>
#include <vector>

using namespace std;

vector<string> getseq(char * db_file) //pobiera sekwencje z pliku
        {
            string seqdb;
            vector<string> seqs;
            ifstream ifs(db_file);
            string line;

            //vector<char> seqs[size/3];

            while(ifs.good())
            {
                getline(ifs, seqdb);
                if (seqdb[0] != '>' & seqdb[0]!=' ')
                {
                    seqs.push_back(seqdb);
                }
            }

        ifs.close();
        return seqs;
        }

int main(int argc, char * argv[1])
{
    vector<string> seqs;   //Holds our strings.
    getseq(argv[1]); //We don't return anything.

    //This is just a matter of taste, we create an alias for the vector<string> iterator type.
    typedef vector<string>::iterator string_iter;

    //Print prelude.
    cout << "Sekwencje: \n";

    //Loop till we hit the end of the vector.
    for (string_iter i = seqs.begin(); i != seqs.end(); i++)
    {
        cout << *i << " "; //Do processing, add endlines, commas here etc.
    }

    cout << endl;
}
Que voulez-vous revenir? Le vecteur ou la chaîne?
Don't utiliser while (en streaming. good ()).
vecteur @Fred Nurk: le Pourquoi et ce que je dois utiliser à la place?

OriginalL'auteur Mateusz Korycinski | 2011-02-03