Q:

How to check if the first element of an vector is a quote in C++

How can I check if the first element of an vector is a quote ?
For exemple: 
vector<string> atom;

How can I check if atom[k][0] got an quote on the first position in C++?
Thank you

A:

You can use
if( atom[k][0] == '\"' )

Exception handled version (.at() throws an error if index is out of bounds):
if( atom[k].at(0) == '\"' )

