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...
Type: Posts; User: Joe1903
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...
But is char[4] or char[8] correct or should it int[4] and int[8]?
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));
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];
};
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...
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...
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...
Testhandler::m_TestParms = new (std::nothrow) TestParms();
if (m_TestParms == 0)
{
throw ...
}
Is that better?
Hi,
I am trying to create struct instance on heap like this:
class Testhandler
{
struct TestParms {
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 *...
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...
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...
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,...
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.
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...
Can that be done hardcoded as well?Like char m_mqprMessageL[8] or char m_mqprFormat[4]?
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...
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...
But what is _IMQSspServiceBase_FetchedFunction(void)? I didn`t understand the inline function?
inline
IMQSspServiceBase::SspFunction::
operator _IMQSspServiceBase_FetchedFunction(void)
No, it is the return (Result) in int CompareCounts..
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...
Which return 0? Could you please give me a small example with the line you mentioned?
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...
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?
......
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...