Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by DarkAlchemist

  1. DarkAlchemist

    STL and structs/classes

    #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?
  2. DarkAlchemist

    STL and structs/classes

    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?
  3. DarkAlchemist

    STL and structs/classes

    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; }
  4. DarkAlchemist

    STL and structs/classes

    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 = &quot;USA&quot...
  5. DarkAlchemist

    STL and structs/classes

    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...
  6. DarkAlchemist

    STL and structs/classes

    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...
  7. DarkAlchemist

    windows Text and lining up columns

    Poor little, heh. Have a good link to read up on list views? MSDN was a bit over powering.
  8. DarkAlchemist

    windows Text and lining up columns

    Wish I could but this is into another apps window so thats out. :/ Oh, and I am basically running ATL to boot.
  9. DarkAlchemist

    windows Text and lining up columns

    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...
  10. DarkAlchemist

    StrProper in C++

    void main() { std::string myString (&quot;heLlo this is a tEsT VI&quot;); 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)...
  11. DarkAlchemist

    StrProper in C++

    How well would this handle BLAH blah vi? Blah Blah VI is what I would expect but the true proper would be Blah blah VI.
  12. DarkAlchemist

    StrProper in C++

    Is there a function like Strlwr and StrUpper but for making a proper case for us C++ users? If so where is it? :) Thanks.
  13. DarkAlchemist

    Here is a tricky I am stuck at.

    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.
  14. DarkAlchemist

    Here is a tricky I am stuck at.

    This is what I came up with but I was so hoping for something more eloquent. if (First == &quot;Strength&quot;) a= m_pCharStats->GetEffectiveAttribute(DecalFilters::eAttrStrength); else if (First == &quot;Endurance&quot;) a=...
  15. DarkAlchemist

    Here is a tricky I am stuck at.

    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...

Part and Inventory Search

Back
Top