|
by: keit6736 |
last post by:
Hi, I'm using the Borland compiler and I've created two templated
classes in which I've overloaded the ostream << operator. However, when
I try and use the operator on objects of either class I get the
following error:
Error: Unresolved external 'operator <<(std::basic_ostream<char,
std::char_traits<char> >&, const BinomialTree<int>&)' referenced from
C:\DOCUMENTS AND SETTINGS\RYAN\DESKTOP\COMPUTER SCIENCE\CS
|
by: Christophe Barbe |
last post by:
I posted a few days ago about the same problem but was not very clear. So
here is my second take at it.
Basically with GCC 3.3.2, I can't compile the example from the
C++ FAQ Lite available online at
http://www.parashift.com/c++-faq-lite/containers-and-templates.html#faq-34.15
Below are the two files that I compile with
g++ foo.cpp -o foo
or
|
by: Adam Parkin |
last post by:
Hello, all I'm having a problem with friend functions in a templatized Queue
class I'm writing using linked lists. The problem is that I can't get the
friend function to be able to access private data from the class. Here's
the gist of the code:
template <class T>
struct NodeType
{
T data;
NodeType<T> * link;
|
by: paidojoao-groups |
last post by:
Given this code:
#include <iostream>
#include <string>
class timestamp
{
public:
timestamp() {
|
by: James Aguilar |
last post by:
Hello, all.
I saw this in the provided code of a lab that I have due in a couple of
weeks in my algorithms class. It compiled fine in g++ but did not compile
with the VC++ compiler. It does not recognize the angle brackets that
follow "<<" in the operator friend declaration.
--- CODE ---
template <class T> class PriorityQueue {
|
|
by: Jim Langston |
last post by:
What I want to do is have an operator= accept a template variable.
I will have some classes which all will contain an instance of a different
class. I want an operator= in yet a 3rd class to accept these classes and
use the instance. This is confusing as heck, so here's kinda what I want to
do:
class COffsetMap
{
public:
|
by: Hamilton Woods |
last post by:
Diehards,
I developed a template matrix class back around 1992 using Borland C++ 4.5
(ancestor of C++ Builder) and haven't touched it until a few days ago. I
pulled it from the freezer and thawed it out. I built a console app using
Microsoft Visual C++ 6 (VC++) and it worked great. Only one line in the
header file had to be commented out.
I built a console app using Borland C++ Builder 5. The linker complained of
references to...
|
by: abelahcene |
last post by:
Hi, Is it a bug ??
I tried to compile a cpp program which ran correctly on previous
release (sarge debian, gcc compiler 3 ), it gave errors, for the
declaration (even if I omit the symbols <)
friend ostream & operator << <(ostream & os, Vector <T& tab);
for other declaration ( not friend), the + operator, it works !! here
is a complete example with errors at the compilation step.
If I omit the << operator, the program will run
|
by: syang8 |
last post by:
Dear all,
I am trying to design classes with stream support. Basically, I want
the operator << work for the base class and all the derived classes.
If the base class is a template class, and the operator << is also
designed as a template function. The program has following linking
errors:
"error LNK2019: unresolved external symbol "class
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: 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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: 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...
|