Search:

Type: Posts; User: mangoMan

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    1,737

    double, long, int ==> string conversion

    Hope someone can tell me how to convert from double, long and int to a string of a specified length. I also need to to pad the string with zeros.
  2. Replies
    3
    Views
    910

    Yes the name does fit and it is not a buffer...

    Yes the name does fit and it is not a buffer overrun problem.

    Someone at work suggested that I might be missing the copy constructor. So I created one and I think that might be the problem but I...
  3. Replies
    3
    Views
    910

    Bizzare: Function Returning Junk

    This is serious stuff guys. Here is what I am working with.....

    I wrote the IString class and it works when tested but when this other guy uses my class for two of his applications the one...
  4. Replies
    3
    Views
    1,389

    elad, thanks for the response. It works now! You...

    elad, thanks for the response. It works now! You were correct.
  5. Replies
    3
    Views
    1,389

    stl string problems with the + operator

    I have created an IString class that wraps around stl string. When I test my classes + operator this is what I get:



    IString sEdc= "Freddy Flinty";
    sEdc = "'" + sEdc + "'";
    cout<< "sEdc =" <<...
  6. Replies
    15
    Views
    2,910

    Kip, I appreciate your help. But the problem...

    Kip,

    I appreciate your help. But the problem is that I am working with old code that cannot be changed. I am removing an old IString class, provided by the IBM open class library, and replacing it...
  7. Replies
    15
    Views
    2,910

    Kip, I don't want to to do that. I want to be...

    Kip,

    I don't want to to do that. I want to be able to call it with the objects.
  8. Replies
    5
    Views
    1,252

    Speedy5, Thanks for the response. I think you...

    Speedy5,

    Thanks for the response. I think you are wrong but I can't tell you why because if I knew I would have been able to solve my problem. I have seen the following call work before:
    ...
  9. Replies
    15
    Views
    2,910

    As per popular demand here it is: The stripped...

    As per popular demand here it is:

    The stripped version of my IString class:



    ///////////////////////////////////////////////////////////////////////
    // istring.hpp...
  10. Replies
    15
    Views
    2,910

    Mr. XSquared, I want to be able to call...

    Mr. XSquared,

    I want to be able to call sprintf like this:

    sprintf(buffer, "hello %s and %s", str1, str2);

    so why are you telling me to write another function that returns a char*. All I am...
  11. Replies
    15
    Views
    2,910

    Thanks for your response but why should I have to...

    Thanks for your response but why should I have to add '()' to the end of the variable.

    How do I default the conversion of an IString object to char*?

    I want to be able to call sprintf like...
  12. Replies
    5
    Views
    1,252

    Thanks for the response but it does not help me....

    Thanks for the response but it does not help me. I know what you just stated. What I am asking is:

    How do I default the conversion of an IString object to char*?

    I want to be able to call...
  13. Replies
    5
    Views
    1,252

    default conversion operator

    If I have function that accepts any type like the formatting function sprintf. I have a bunch of conversion operators for my IString class how do I make sure that when I call sprintf only the char*...
  14. Replies
    15
    Views
    2,910

    Interesting Problem: sprintf does not work

    Hello All,

    This is the code that does not work properly:



    char dbszSQL[1024];

    IString theStartDate("2004-01-01-00.00.00.000000"), theEndDate("2005-01-01-00.00.00.000000");
  15. overloaded operator for type conversion error

    Here is what my operator looks like:


    istring.hpp
    ---------------

    operator char*() const;
  16. Replies
    4
    Views
    3,056

    Thanks for the idea but what do I do with the...

    Thanks for the idea but what do I do with the string being used in the constructor in the header file:

    IString::IString(string s)

    because this is going to require '#include<string>' in the...
  17. Replies
    4
    Views
    3,056

    STL string wrapper

    I am trying to wrap an old library using STL so we don't have to change all the 50 applications to use STL. The old library used the IString class so here is what my test wrapper class looks like but...
  18. Replies
    2
    Views
    3,772

    Yes I did switch to the new C headers but that...

    Yes I did switch to the new C headers but that did not solve the problem.
  19. Replies
    2
    Views
    3,772

    memset has conflicting declaration

    Hello Everyone,

    I compile the following file, mydate.cpp, and get these errors:


    idun:/h/odin/IOCDir/IDate >make
    /usr/vacpp/bin/xlC_r -c -qsource -qlistopt -qxref -qattr...
Results 1 to 19 of 19