P
pkirk25
list<string> mats_list;
list<string>::iterator i;
string s, t;
i = s.size();
if (i > 4)
{
mats_list.push_back(s);
}
Thois errors with:
....main.cpp(19) : error C2679: binary '=' : no operator found which
takes a right-hand operand of type '__w64 unsigned int' (or there is no
acceptable conversion)
i = s.length(); fails the same way.
I am new to C++ so while this may appear a basic question, how can I
use the STL string library to do the equivalent of
char *s = "The answer is 42 - what was the question?";
size_t i = strlen(s);
If (i < 5) {....}
Thanks in advance.
list<string>::iterator i;
string s, t;
i = s.size();
if (i > 4)
{
mats_list.push_back(s);
}
Thois errors with:
....main.cpp(19) : error C2679: binary '=' : no operator found which
takes a right-hand operand of type '__w64 unsigned int' (or there is no
acceptable conversion)
i = s.length(); fails the same way.
I am new to C++ so while this may appear a basic question, how can I
use the STL string library to do the equivalent of
char *s = "The answer is 42 - what was the question?";
size_t i = strlen(s);
If (i < 5) {....}
Thanks in advance.