473,465 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Is it possible to write a constructorless class? if yes, how?

Ciary
247 Recognized Expert New Member
hi everyone,

the idea is actually very simple. i want to create a class like "Math" that i can use without any kind of constructor. is this possible, and how?

thanks
Oct 25 '10 #1
1 1510
jkmyoung
2,057 Recognized Expert Top Contributor
Make it a static class. All your functions and class members must also be static.
Oct 25 '10 #2

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

Similar topics

2
by: 3doutpost | last post by:
is there a way to write a class that will be used to store a list of things so that you can pass in the STL container type and it will be filled with the right thing - something like (if it were...
5
by: ahaupt | last post by:
Hi all, Do you know if it is possible to hide class methods when the class has not been "properly" instantiated? Say in the following example, I'd like to hide or disable Drive() when the...
5
by: localhost | last post by:
I have a complex ASPX page, and in the code-behind I instance an object that inherits from Class. Upon instantiation, I want the object to write some JavaScript code at the end of the HEAD tag,...
5
by: i.c.code | last post by:
maybe like: #include "boost/function.hpp" template <typename T> class Do_When_Return { private: Do_When_Return(const Do_When_Return&); Do_When_Return();
1
by: Arpan | last post by:
Consider the following class named "Constructor.vb" which exists in C:\Inetpub\wwwroot\ASPX: Imports System Imports System.Data Imports System.Web Imports System.Web.HttpResponse Imports...
6
by: Hubert Fritz | last post by:
Hello, I fear I want to have something which is not possible in C++. How is it possible to define a base class so that the derived class is forced to contain a static member variable, which...
7
by: mahi543 | last post by:
can we write a class in an interface
5
by: D_a_n_i_e_l | last post by:
Is it possible to split a class definition over two files? Thanks.
2
by: babakandme | last post by:
Hi to every body...:D I'm a novice C++ programmer & I've a question, How can I write a class as follow to a file... Class A { public: // Accessors Methods...
1
by: Scott Stark | last post by:
What's the best way to represent data that exists in a grid structure? Let's say product #12345 is availabile in 3 colors, my grid might look like this: COLOR S M L ...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
1
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.