how would i make a new type of variable, like instead of int or double? would i use classes or something like that?
mebob
0
Junior Poster in Training
Recommended Answers
Jump to PostYes. Classes is one way. For example here is a simple Type.
class Int{ int val; public: Int() {val = 0;} Int(const int& initVal) { val = initVal; } /* more functions */ };
You could make it just like a int variable, but it has its …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.