Search:

Type: Posts; User: Joe1903

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    3,962

    I am very sorry, I will not create threads...

    I am very sorry, I will not create threads anymore.
    I have to do something and I try my best.
    Could you please tell whether my approach with itoa is correct?And my last question: What can be done...
  2. But is char[4] or char[8] correct or should it...

    But is char[4] or char[8] correct or should it int[4] and int[8]?
  3. Replies
    3
    Views
    3,962

    I think I need this step,but I am not sure. ...

    I think I need this step,but I am not sure.


    char myMQparm[8];
    itoa (msgDescriptor.Expory, myMQparm,10);
    memcpy(myStruct.parm, myMQparm, sizeof(myStruct.parm));
  4. Replies
    3
    Views
    3,962

    MQMD - MQLONG - need urgent help

    Hi,

    I have a question regarding the MQ data type MQLONG.
    Is this possible?If not how can this be done?



    struct myStruct{
    char parm[8];
    };
  5. Replies
    9
    Views
    5,183

    I thought something like this: TestParms *...

    I thought something like this:

    TestParms * testParmsPtr = &myStruct;

    Last question: For my second try, would my constructor set all parms to 0 (memset)? Is this correct how I did it?
    And do...
  6. Replies
    9
    Views
    5,183

    Ok understand. What I want to do is following: I...

    Ok understand. What I want to do is following: I want to copy parameter values into my struct variables and give the pointer to the memory as parameter to call a Cobol module. What is better my first...
  7. Replies
    9
    Views
    5,183

    Ok I will do.Meanwhile another question: what...

    Ok I will do.Meanwhile another question: what would be the difference if I do this (within the main):

    TestParms myStruct;

    Would that create an object myStruct which I can access the members...
  8. Replies
    9
    Views
    5,183

    Testhandler::m_TestParms = new (std::nothrow)...

    Testhandler::m_TestParms = new (std::nothrow) TestParms();

    if (m_TestParms == 0)
    {
    throw ...
    }

    Is that better?
  9. Replies
    9
    Views
    5,183

    Create struct on heap

    Hi,

    I am trying to create struct instance on heap like this:



    class Testhandler
    {

    struct TestParms {
  10. Replies
    6
    Views
    9,025

    This is my complete memcpy-part. In that case, it...

    This is my complete memcpy-part. In that case, it should work now (all of my members are char [] and HyqcmqprParms is my struct):



    const BASBuffer & buffer = msg->buffer();
    const char *...
  11. Replies
    6
    Views
    9,025

    Ok I am confused but I try to explain what I...

    Ok I am confused but I try to explain what I understand:

    As data is already a pointer it can be passed as data or &data,the result would be the same.And all other parameters which I extract from...
  12. Replies
    6
    Views
    9,025

    Ok thank you very much.If my second Argument is...

    Ok thank you very much.If my second Argument is pointer, I have to use &,correct?
    const char * data = buffer.getBuffer();

    memcpy(m_mqprMessageP, &data, sizeof(m_mqprMessageP));

    I want to set a...
  13. Replies
    6
    Views
    9,025

    memcpy - & or not?

    Hi,

    I want to use memcpy to copy parameters. I am not sure whether my usage of & is correct or not? Could someone help me please?


    memcpy(m_msgParms.m_mqprReplyQueue,...
  14. Replies
    6
    Views
    6,402

    Not that much, I am a newbie in Cobol. Or let's...

    Not that much, I am a newbie in Cobol.
    Or let's say,I never implemented in Cobol, now I am trying to get some basics which I need for my C Implementation.
  15. Replies
    6
    Views
    6,402

    Thanks.I have at least 2 questions: 1.) I've...

    Thanks.I have at least 2 questions:

    1.) I've read that S9(4) COMP-5 is a "half-word" and S9(8) COMP-5 is a "double-word".As I know half-word has 2 BYTE and double-word has 8 BYTE. What does it...
  16. Replies
    6
    Views
    6,402

    Can that be done hardcoded as well?Like char...

    Can that be done hardcoded as well?Like char m_mqprMessageL[8] or char m_mqprFormat[4]?
  17. Replies
    6
    Views
    6,402

    Convert COBOL to C

    Hi,

    I want to convert a COBOL copybook into C to call a COBOL-API through C. Is that correct what I have done?


    struct TestParms {
    // Filler PIC X(8) VALUE 'HYQCMQPR'.
    char...
  18. struct initialization / memcpy / pointer to memory

    Hi,
    I want to initialize a struct using a constructor, fill in the variables using memcpy with values from msgDescriptor and create a pointer to the beginning of the memory adress for this struct...
  19. Replies
    8
    Views
    4,583

    But what is...

    But what is _IMQSspServiceBase_FetchedFunction(void)? I didn`t understand the inline function?



    inline

    IMQSspServiceBase::SspFunction::

    operator _IMQSspServiceBase_FetchedFunction(void)
  20. No, it is the return (Result) in int...

    No, it is the return (Result) in int CompareCounts..
  21. I have to change the return in line 248 (function...

    I have to change the return in line 248 (function OutputWords), is that correct? Additionally, in line 137and 150 I should change return -1 to Status = NO_MEMORY_FOR_WORDNODE to have the same...
  22. Which return 0? Could you please give me a small...

    Which return 0? Could you please give me a small example with the line you mentioned?
  23. Alphabetically ascended words if frequency of occurrence is equal

    Hi all,
    I have following code to print the distinct words in its input sorted into descreasing order of
    frequency of occurrence. Now I want to add following scenario: If the frequency of occurrence...
  24. Thread: Dynamic fgets

    by Joe1903
    Replies
    1
    Views
    3,309

    Dynamic fgets

    Hi all,

    I want to change following function to a "dynamic" fgets for string with unknown length and without any use of a buffer.Could someone give me an example with realloc please?



    ......
  25. Replies
    49
    Views
    20,366

    In this try-catch-Block above, is it neccessary...

    In this try-catch-Block above, is it neccessary to check the return value of new (nullptr if no memory allocatable) or is it handled by exception class automatically?
    I need to ensure that there is...
Results 1 to 25 of 85
Page 1 of 4 1 2 3 4