ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » C++ header files

Post new topic  Reply to topic
 C++ header files « View previous topic :: View next topic » 
Author Message
ydsk
PostPosted: Sun Feb 18, 2007 1:08 am    Post subject: C++ header files Reply with quote

Chevalier

Joined: 23 May 2005
Posts: 410

Hi,

In C we have just 1 header file cmqc.h.

But why do we have so many header files in C++ ?

Can somebody pls explain ?

And I am thinking we can just include all the header files in 1 header file say, xyz.hpp and just include it in every C++ MQ application program.

Any suggestions ... ?

Thanks.
ydsk.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sun Feb 18, 2007 6:41 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

This is a meaningless thing to worry about.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
tleichen
PostPosted: Tue Feb 20, 2007 7:19 am    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

It really depends on how you are doing the MQ programming that would dictate which header file(s) one would need. If you do just the native calls like MQGET and MQPUT, then you most likely will get by with what's in cmqc.h. If you use some other API's, then there are other header files that are required.
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
jsware
PostPosted: Tue Feb 20, 2007 9:48 am    Post subject: Re: C++ header files Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

ydsk wrote:
Hi,

In C we have just 1 header file cmqc.h.

But why do we have so many header files in C++ ?

Can somebody pls explain ?

And I am thinking we can just include all the header files in 1 header file say, xyz.hpp and just include it in every C++ MQ application program.

Any suggestions ... ?

Thanks.
ydsk.
For the same reason that the C/C++ runtime libraries don't have just a single header file to include - You've got string.h, stdlib.h, memory.h, iostream.h, iostream, vector and more etc. etc. .

You don't have to create your own header file to include them all, just include imqi.hpp and that will include them all for you.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
ydsk
PostPosted: Tue Feb 20, 2007 11:49 am    Post subject: Reply with quote

Chevalier

Joined: 23 May 2005
Posts: 410

Actually, that was my question.

If I include imqi.hpp in my C++ programs does it have everything that is there in the other MQ/C++ header files ? Do I have to include any other MQ/C++ headers in my program ?

Thanks.
ydsk.
Back to top
View user's profile Send private message
tleichen
PostPosted: Tue Feb 20, 2007 5:03 pm    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

Again, it depends what you are doing. Some methodologies only require certain headers. But, if you're the lazy type and don't want to bother learning any of that, then you can include imqi.hpp and you will get everything.
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
jsware
PostPosted: Wed Feb 21, 2007 7:20 am    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

ydsk wrote:
Actually, that was my question.

If I include imqi.hpp in my C++ programs does it have everything that is there in the other MQ/C++ header files ? Do I have to include any other MQ/C++ headers in my program ?

Thanks.
ydsk.

I think the C++ programmer's guide tells you what gets included or not by which header files.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
mvic
PostPosted: Wed Feb 28, 2007 4:19 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

ydsk wrote:
If I include imqi.hpp in my C++ programs does it have everything that is there in the other MQ/C++ header files ? Do I have to include any other MQ/C++ headers in my program ?

Follow the example in the sample program imqsput.cpp:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <imqi.hpp> // WebSphere MQ MQI
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » C++ header files
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.