Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Recent content by jrrs

  1. jrrs

    C++ String Manipulation Question

    You could also use the windows API function: void _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext) in <stdlib.h>. For (my) convenience I use this in a C++ wrapper and return std::string values. One also needs to use the char *_getcwd(char *buffer, int maxlen) if you...
  2. jrrs

    Manipulating strings using C++Builder

    I don't see a LeftStr() mentionned in the list of methods for AnsiString nor is LeftStr() in the Borland C++ Help Index. The closest function I can think of is &quot;AnsiString __fastcall SubString(int index, int count) const;&quot;
  3. jrrs

    How can I convert numeric to string?

    IMHO stringstream provides an easy and typesafe way to convert anything to strings: std::stringstream ss ; ss << scientific << 5.3*sin(1.23456) ; cout &quot;The answer is &quot; << ss.str() << endl ; Have a look at this article...

Part and Inventory Search