|
by: Jim Strathmeyer |
last post by:
I have a weird question about const correctness when using an stl list.
I have a wrapper Inventory class that holds a list of pointers to
Items. (Yes, they have to be pointers.)
Now, obviously the Inventory class isn't going to mutate the Items, so
its Add function should be Add(const Item *), and the list should be
std::list<const Item *>. One way to access the Inventory's item's is to
iterate through them with:
std::list<const Item...
|
by: David. E. Goble |
last post by:
Hi all; I have the following files; index.html, sigsheader.js,
sigsboby.js, smilesbody.js and smiles.js. The sourse is below.
The page displays two manual slide shows... Each slideshow has a set
of buttons. the top slideshow (the smiles work fine. How ever the sigs
slideshow displays the pictures in the smiles section.
*************** index.html *****************************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
|
by: Adrian |
last post by:
Could someone please tell me how I can check out the correctness of a site's
coding. I have brought about a website, checked it out with various
browsers. It seemed to be ok. Then I come across a browser that has problems
with my site, and I'd like to find out what I have done wrong. Apologies if
this question has been asked a million times before, however I do not have
this information and would be grateful if someone could provide me with...
|
by: quantdev2004 |
last post by:
Hi all,
I have been deling with this kind of code:
class Foo
{
public:
void NonConstMethod()
{}
};
|
by: mandydhaliwal |
last post by:
Hi Guys,
I was going through a product's source code. They never use const
function arguments with default value.
for instance
Never noticed following type of declaration
foo ( const int param1, const bool = false) const;
|
|
by: Clint Olsen |
last post by:
Hello:
I posted a thread on comp.programming awhile back asking about an algorithm
I implemented on square root. The idea was to use the square root of a
prime number as a convenient way to get a pseudorandom number generator.
So, rather than calculate the square root to try to get a particular
precision answer, you would calculate it to x number of bits. This
particular function takes a radicand and the number of iterations as...
|
by: nvitacolonna |
last post by:
I have found this page:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1360.htm
identifying const-correctness inconsistencies in the input/output
standard libraries (e.g., tellg() not being declared const). I was
just wondering: what is the current opinion of the standard committee
about such issue? Is that going to be taken into account for the new
standard? (I admit that I was a bit surprised when I discovered that...
|
by: David |
last post by:
Hi list.
What strategies do you use to ensure correctness of new code?
Specifically, if you've just written 100 new lines of Python code, then:
1) How do you test the new code?
2) How do you ensure that the code will work correctly in the future?
Short version:
|
by: =?iso-8859-1?Q?Daniel_Lidstr=F6m?= |
last post by:
Hello!
I have a strange problem with my pimpl implementation. What happens is that
const correctness is not respected. Let me go straight to the code:
#include <iostream>
struct Geometry {};
class LineData
|
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: 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: 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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|