#1 this code is a bit above my current level but I think I see what you did.
To me it seems you made a class to do each function but why do I need a class to do that?
Well, what would happen if I wanted to find on any of those fields besides coord? What I mean is maybe I wish to search based on coords this time but maybe next time based on Country then the next time maybe base the search on PersonsName?
I haven't tested the code yet but I would like to know what this part is for?
bool operator == (const std::string& coords)
{
return Coords == coords;
}
Just wanted to add this
class Country
{
public:
std::string CountryName;
std::string PersonsName;
std::string Coords;
};
std::vector <Country> places;
Country d;
int main(int argc, char* argv[])
{
d.CountryName = "USA"...
UGH :( I suppose I better stick with parallel vectors for now and just use 3 vectors and use find on the coords vector and then take the iterator-begin to find my other related fields. Much less work doing it that way regardless how it looks but no not happy I have to do it this way just its...
This is what I came up with but it refuses to compile can anyone tell me what is wrong?
class Country
{
public:
std::string CountryName;
std::string PersonsName;
std::string Coords;
};
std::vector <Country> places;
Country d;
int main(int argc...
Back when all fonts were fixed at 8x8 you could use a simple formula saying if you wanted your 2nd column to line up at position 40 it was simple to for (int x = 0; x < 39; x++) print[space]
Now that we have true type fonts how do you implement that so at position 40 (regardless of the font...
void main()
{
std::string myString ("heLlo this is a tEsT VI");
std::string::size_type len = myString.length();
int a = 1;
for (int x = 0; x < len; x++)
{
int c = myString[x];
if (a)
{
c = toupper(c);
a = 0;
}
else
c = tolower(c);
if (c == 0x20)...
Now thats pretty sweet and I have as yet to touch maps (heck when I did C I do not even think I did them then).
Very nice indeed and now to dust off the books on the map feature. :)
Thank you.
This is what I came up with but I was so hoping for something more eloquent.
if (First == "Strength")
a= m_pCharStats->GetEffectiveAttribute(DecalFilters::eAttrStrength);
else if (First == "Endurance")
a=...
I have 2 strings like so
a = Focus
b = Coordination
now I need to call a function like so
m_pCharStats->GetSkill(DecalFilters::eAttributeFocus)
and
m_pCharStats->GetSkill(DecalFilters::eAttributeCoordination)
How can I do this in a compiled framework? In a script environment I could simply...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.