|
Unless it is qualifid with the current class name, correct?
You can 'force' the virtual function of a specific, known baser class, to be invoked as long as you are at least derived from said baser class.
That would be safe.
|
|
|
|
|
Anything is safe as long as you know what you are doing. In the case of the poster though, it's not wise to baffle him with technicalities while he is just starting on the basics. Later, after he has got the basics under his thumb, is when he will start breaking the rules and pushing his code as far as it will give
|
|
|
|
|
|
Hello friends,
In operator overloading concept in c++ ,certain operators such as
sizeof : sizeof operator
. : membershsip operator
.* : pointer to member operator
:: : scope resolution operator
?: : conditional operator
cannot be overload in c++ , why it so ??
What is the technical reason behind it feature in c++?
-PHIJO MATHEW PHILP.
-PHIJO MATHEW PHILP.
|
|
|
|
|
|
One thing that it does not mention is that sizeof can be (or always is?) evaluated at compile time (at least by some compiler implementations). This would not be possible if it was overloaded, which requires runtime.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
In windef.h the two macros min and max are defined. Now I remember some time ago seeing a third macro, in somebody's sample code, which returned a value within a range. ie it accepted 3 paramaters, the value to test and the min and max values. The macro would test the value, if lower or higher than the min max, it would return the min or max, otherwise return the exisiting value.
It's possible this was a user defined macro, but just out of curiosity, does anybody know if it already exists?
|
|
|
|
|
something like this?
#define range(_x, _lo, _hi) (max(min((_x), (_hi)), (_lo))
or, even better:
template < class T> _inline T t_min (const T &i, const T &j)
{ return ((i < j) ? i : j); }
template < class T> _inline T t_max (const T &i, const T &j)
{ return ((i > j) ? i : j); }
template < class T> _inline T t_range (T _val, const T &_min, const T &_max)
{ return t_max(t_min(_val, _max), _min); }
template < class T> _inline T t_clamp (T _val, const T &_min, const T &_max)
{ _val = t_min(t_max(_val, _min), _max); return _val; }
|
|
|
|
|
Thanks for the templates. Did you create the macro or was it defined somewhere? I ended up creating my own similar to what you have given. But I am curious if it, or one similar, is already in a header file somewhere.
|
|
|
|
|
"create" is too strong a word for just, well, typing it in.
there might be an 'official' one out there somewhere, but it's not really worth looking for.
|
|
|
|
|
i am doing a project on image processing, i have to change higher bit to lower bit and brightness and contrast adjustments
ruth
|
|
|
|
|
Look for a graphics library called "freeimage". It's a quality library (better than CXImage here on CodeProject), and I'm sure it can handle any image processing you might need to perform.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
scalar quantization first using 24-bit
then converse to 16 or 8 bit
just do it
|
|
|
|
|
HI,
I have to do a project on image processing.
How can i recognize skinwounds from normal skin??
Any suggestions??!!
Regards, Atbir
|
|
|
|
|
atbir wrote: I have to do a project on image processing.
For who ?
atbir wrote: How can i recognize skinwounds from normal skin??
Because scabs are red ?
What sort of wounds ? What sort of images ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I don't know, check for smooth skin surfaces vs. non-smooth skin surfaces ? do an edge detection and check for edges on the skin ?
me think it's a hard task.
|
|
|
|
|
Hi,
I would start with GIMP or any other popular image processing programme, and experiment with some functions to obtain clear view of such wound, that would be easy to recognize from the rest of the skin. Then you can try to find out how to implement algorithms used to obtain this effect. For example, by using gaussian blur and emboss, you can get clear view of bumps on the skin. By using 3d projection, you can even detect, how deep is such wound. Just a thought.
Hope that helps.
Regards
|
|
|
|
|
Hi !!
I want to change my project name..as in...I want to change my .sln ( solution file),.def file,.arx file...ie all file have same old name now i want to change name..
i tried to right click on .sln file but it showing me error ( "The solution can not be renamed bcz solution already exist file with the specified name")
what to do now..??
Thanking you..
Shah Satish
|
|
|
|
|
Do the files exist with that name ? Delete them.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hello All,
I have just started learning API coding.
I want to know is it possible to create Dialog window, Menu , Buttons , list boxes and all without using adding them from resource or from wizard ?
Or we have to add them using add resource and later we have to write API code to access them ???
Please help me with this I am very much confused and also if u have link for any notes which explains who to work with API like creating window , buttons and all please give a link.
Thanking you,
Suresh H.
|
|
|
|
|
There is nothing that you can only do with a wizard. You can create anythign you like, the templates just position everything for you.
If you want to learn Win32, buy 'Programming Windows 5th Edition' by Charles Petzold.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Christian Graus,
Thank you very much for the response.
I will get hold of that book and start learning.
|
|
|
|
|
Hi,
You will also learn that resources are just a quicker and easier way of achieveing the same goal with API.
Regards
|
|
|
|
|
salam good morning,
when I try to execute a sample done in VC++ 6 and I m working with VC++ .net it allow me to convert it but when I run it, it doesn't work there is many errors. and I remarque that many people tried it and it work for them but in VC++ 6.
what's the difference between these two version normally when we do an amelioration we keep the basics of the last version ?
thank you !
have a nice day
zizzzzzzzzzz
|
|
|
|
|
zizzzz wrote: when I try to execute a sample done in VC++ 6 and I m working with VC++ .net
What are you trying to do ? To execute a program, you don't need to use VC++, you simply starts your program. You mean you try to open the project file created with VC6 under VC.NET ?
zizzzz wrote: it allow me to convert it but when I run it, it doesn't work there is many errors
Again, what means "run" in this case ? For me running a program is just executing it. You probably meant compile it ? And it generates a lot of errors? Is that correct ? Ok, but what are these errors ? It's difficult to help without actually having a look at these errors.
Could you please pay more attention at the words you are using because it's causing a lot of confusions. If you want that people help you, they first need to understand clearly what the problem is.
|
|
|
|