|
by: pnsteiner |
last post by:
i want to use the << operator defined for ostream with an object that
itself knows nothing of the operator, but is castable to ostream&. it
seems that C++ doesn't do implicit casts before invoking a custom
operator.
i've tested with visual c++ 7 and the comeau online compilers, both
required an explicit cast. is there a way to hint the compiler at using
the cast operator implicitely, or is this not part of the language at
all? (i have a...
|
by: Bratislav Jevtic |
last post by:
hi,
Let's suppose I've got 2 classes: MyClass and MyClassColl (coll is inherited
from ArrayList, for instance). But, when I invoke GetXXX or something
returning object, I receive an object - not instance of MyClass. I've tried
with implicit conversions - not working.
Is there any way to inherit some collection that will have instances of
custom class and make implicit conversion for return values? Practically, I
need typed collection....
|
by: FB's .NET Dev PC |
last post by:
Interesting note, the code below as is will attempt to cast what is clearly
indicated as a string into a double. This is becuase the use of + as a
concatenation operator. The error message generated is included with the
code. Use & instead and it works.
Dim pstrSend As String = ""
'ActionCode 1 and 2 are type BYTE, Msg is a byVal string parameter
|
by: Pieter Breed |
last post by:
Hi All,
Please excuse me, but the bulk of my post will be a code post. It
describes some weirdness with regards to the implicit casting operator.
The crux of the problem is this:
I want to set a property on a class that takes an interface instance.
I have a class that can cast implicit to a class that impliments said
interface,
but the compiler moans and says it cannot cast implicitly like that.
|
by: arindam.mukerjee |
last post by:
I was running code like:
#include <stdio.h>
int main()
{
printf("%f\n", 9/5);
return 0;
}
|
|
by: not_a_commie |
last post by:
I have an Angle class that I store angles in. It's basically just a
bunch of fancy functions for manipulating a double. It has implicit
casts for converting to/from double. Due to the project structure and
where it stores the preferred SI units for display, I wanted to have
the TypeConverter in a different project that has no reference to the
angle class. However, returning a double from the ConvertFrom function
throws an error that it...
|
by: arnuld |
last post by:
I have checked the FAQ: http://c-faq.com/malloc/mallocnocast.html
FAQ discusses a special case when programmer has forgotten to do
#include <stdlib.h>. I am including this header and I am not doing any
explicit cast:
#include <stdlib.h>
|
by: Kozy |
last post by:
Greetings,
i want to turn off implicit casting. The thing is we are writing db2 procedures on 9.7 version and when we try to build them on older production versions ( 9.5, 9.1 ) we have a lot of problems because of implicit casting.
Is there any parameter or a registry parameter that i can use to disable implicit casting?
thank you for your answer,
With regards,
Marko
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|