473,396 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

What does Box<Object> mean?

Hi,
I have a question related to c++ syntax. I was looking at c++ code and I noticed that a lot of the times notation in the following format (with different names of course) Box<Object>. An example of such syntax is seen below too:

Expand|Select|Wrap|Line Numbers
  1. template <typename Object>
  2. class Box_tester:public Tester< Box<Object> > {
  3.     using Tester< Box<Object> >::object;
  4.     using Tester< Box<Object> >::command;
  5.  
  6. public:
  7.     Box_tester( Box<Object> * obj = 0 ):Tester< Box<Object> >( obj ) {
  8.         // empty
  9.     }
  10.  
  11.     void process();
  12. };
  13.  
  14.  
What does this mean? I am guessing it is related to templates?

thanks!
Dec 20 '10 #1

✓ answered by weaknessforcats

What you have posted is a template for a class named Box_Tester that is derived from a class Tester.

What you need to do next is grab a C++ textbook and read the chapters on templates. Then you will see how this code works.

1 1747
weaknessforcats
9,208 Expert Mod 8TB
What you have posted is a template for a class named Box_Tester that is derived from a class Tester.

What you need to do next is grab a C++ textbook and read the chapters on templates. Then you will see how this code works.
Dec 20 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: M. Magistri | last post by:
Hi all! Why doesn't the following code load my applet under WinXP with Internet Explorer 6? <SCRIPT language="javascript" type="text/javascript"> <!-- if (getBrowser()=="IE"){...
6
by: Christopher Benson-Manica | last post by:
(I posted this as a reply to my thread about iframes, but I think it may get mostly ignored there.) http://ataru.gomen.org/files/test.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"...
4
by: KC | last post by:
Could some one explain to me the casting rules for sending generic lists, ex. List<Person>, to a function that accepts List<object>? I cannot get the following easy-cheesy app to work. I get the...
2
by: Sam Samnah | last post by:
I posted this during the weekend and I think it was missed so I am posting it again. I'm in real big trouble with this and need help desperately. Any suggestions will be met with unbelievable...
4
by: msnews.microsoft.com | last post by:
hello every one i am using media player in internet explorer but i cannot access it directly in code behind, so do you know a way to access it? <object id="video123"...
5
by: mark4asp | last post by:
According to this <http://css-discuss.incutio.com/?page=BoxModelHack> IE6 will display differently to the W3C standard. Only IE6/strict and I suppose IE 7 display correctly. IE 6 transitional and...
0
by: diver | last post by:
I was using an <iframe> to load a website within my .aspx page. When the user "logged out", I called a javascript break out function to breakout of the frame and load the appropriate page when...
9
by: Stephan Steiner | last post by:
Hi I seem to have a bit of trouble understanding one bit of how generics work: In C#, every class automatically derives from object, and inherits a bunch of properties (i.e. ToString()). Thus,...
4
by: Rasarx | last post by:
Being new to VB, I'm trying to understand what a construct like means and how to use it. I thought anything with brackets is an escaped variable to allow using keywords like boolean, as in . But I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.