| Author | Message | 
		
		  | ydsk | 
			  
				|  Posted: Sun Feb 18, 2007 1:08 am    Post subject: C++ header files |   |  | 
		
		  | Chevalier
 
 
 Joined: 23 May 2005Posts: 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 |  | 
		
		  |  | 
		
		  | jefflowrey | 
			  
				|  Posted: Sun Feb 18, 2007 6:41 am    Post subject: |   |  | 
		
		  | Grand Poobah
 
 
 Joined: 16 Oct 2002Posts: 19981
 
 
 | 
			  
				| This is a meaningless thing to worry about. _________________
 I am *not* the model of the modern major general.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | tleichen | 
			  
				|  Posted: Tue Feb 20, 2007 7:19 am    Post subject: |   |  | 
		
		  | Yatiri
 
 
 Joined: 11 Apr 2005Posts: 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 |  | 
		
		  |  | 
		
		  | jsware | 
			  
				|  Posted: Tue Feb 20, 2007 9:48 am    Post subject: Re: C++ header files |   |  | 
		
		  |  Chevalier
 
 
 Joined: 17 May 2001Posts: 455
 
 
 | 
			  
				| 
  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. 
	| 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.
 |   . 
 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 |  | 
		
		  |  | 
		
		  | ydsk | 
			  
				|  Posted: Tue Feb 20, 2007 11:49 am    Post subject: |   |  | 
		
		  | Chevalier
 
 
 Joined: 23 May 2005Posts: 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 |  | 
		
		  |  | 
		
		  | tleichen | 
			  
				|  Posted: Tue Feb 20, 2007 5:03 pm    Post subject: |   |  | 
		
		  | Yatiri
 
 
 Joined: 11 Apr 2005Posts: 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 |  | 
		
		  |  | 
		
		  | jsware | 
			  
				|  Posted: Wed Feb 21, 2007 7:20 am    Post subject: |   |  | 
		
		  |  Chevalier
 
 
 Joined: 17 May 2001Posts: 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 |  | 
		
		  |  | 
		
		  | mvic | 
			  
				|  Posted: Wed Feb 28, 2007 4:19 am    Post subject: |   |  | 
		
		  |  Jedi
 
 
 Joined: 09 Mar 2004Posts: 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 |  | 
		
		  |  | 
		
		  |  |