|
by: John Black |
last post by:
Hi,
I am not familiar with for_each very well, suppoase I have a
vector<pair<unsigned int, unsigned int> > vec1 and the contents are
{<0x00000000, 0x000000FF>, <0x10000000, 0x2FFFFFFF>}
what I want is to create another vector, vector<int> vec2, which store
all the first 8 bit heads of the integer in vec1, for the above example,
0x00000000 & 0xFF000000 ==> 0x00000000,
|
by: koperenkogel |
last post by:
Dear cpp-ians,
I am working with a vector of structures.
vector <meta_segment> meta_segm (2421500);
and the structure look like:
struct meta_segment
{
float id;
float num;
|
by: John |
last post by:
How do I copy all the elements of a map to a vector
efficiently? The vector is empty initially and needs
to be populated with the map elements in sorted order.
Thanks,
--j
|
by: ma740988 |
last post by:
For starters,
Happy New Year to all!!
I created a vector of pairs where pair first is a primitive and pair
second is a vector of ints.
So now:
# include <iostream>
# include <vector>
|
by: BarrySDCA |
last post by:
I have a database being populated by hits to a program on a server.
The problem is each client connection may require a few hits in a 1-2
second time frame. This is resulting in multiple database entries -
all exactly the same, except the event_id field, which is
auto-numbered.
I need a way to query the record w/out duplicates. That is, any
records exactly the same except event_id should only return one record.
Is this possible??
|
|
by: Allerdyce.John |
last post by:
How can I emove an item in STL iterator without use the STL algorithm?
I know we can use stl erase, find_if to remove items from a STL vector
, but how can I do the same without using STL algorithm?
vector<int> srcVector;
vector<int> destVector;
for (vector<int>::iterator itr = srcVector; itr != srcVector; itr++) {
int i = (*itr);
|
by: Manish |
last post by:
The topic is related to MySQL database.
Suppose a table "address" contains the following records
-------------------------------------------------------
| name | address | phone |
-------------------------------------------------------
| mr x | 8th lane | 124364 |
| mr x | 6th lane | 435783 |
| mrs x | 6th lane | 435783 |
|
by: arnuld |
last post by:
this is the code:
-------------------------------------------------------------------------
#include <iostream>
#include <string>
#include <vector>
struct Pair {
std::string name;
|
by: ejack |
last post by:
int total = static_cast<int>(vComp.size()) - 1;
int tTotalUnits = 0;
float tTotalCostJob = 0;
int i = 0;
int j = 0;
int counter = 0;
bool foundFlag;
vector<string> vItems;
vector<string> vHolding;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: 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: 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
|