Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
pair
- Page 1
Re: How to Implement Lazy Loading for Faster Web Portals
Programming
Web Development
2 Months Ago
by jkon
The loading="lazy" HTML attribute-value
pair
was introduced in 2019–2020, so I would guess it …
Re: How to Implement Lazy Loading for Faster Web Portals
Programming
Web Development
2 Months Ago
by Dani
> The loading="lazy" HTML attribute-value
pair
was introduced in 2019–2020, so I would guess it …
Re: pair
Programming
Software Development
17 Years Ago
by nurulshidanoni
…gt; template<class C> class
Pair
{ public:
Pair
(C, C);
Pair
(
Pair
&); void Display(); private: C first;… C second; }; template<class C>
Pair
<C>::
Pair
(C left, C right) { first = left; second… = right; } template<class C>
Pair
<C>::
Pair
(
Pair
<C>& p) { first = p.…
Re: pair
Programming
Software Development
17 Years Ago
by nurulshidanoni
…Display? error C2061: syntax error : identifier '
pair
' error C2109: subscript requires array or pointer type… [code=C++] { int
pair
; const int student_size = 12;
pair
<int> *
pair
[student_size]; // Declare an array…= 0; i < student_size; i++); {
pair
[i] = new
pair
<int>(1,i); // Construct each new…
Re: pair
Programming
Software Development
17 Years Ago
by Ancient Dragon
… Display? error C2061: syntax error : identifier '
pair
' error C2109: subscript requires array or pointer type… [code=C++] { int
pair
; const int student_size = 12;
pair
<int> *
pair
[student_size]; // Declare an array… = 0; i < student_size; i++); {
pair
[i] = new
pair
<int>(1,i); // Construct each new…
Re: pair
Programming
Software Development
17 Years Ago
by nurulshidanoni
…I put put like this? [code=C++] { typedef std::
pair
<int,int> RandomPair; typedef std::vector<RandomPair&…gt; for (int i = 0; i < student_size; i++)
pair
[i] = new
pair
<int>(1,i); // Construct each new…give its address to an index in the pointer array
pair
[3]->Display(); //since Display is a member …
Re: pair
Programming
Software Development
17 Years Ago
by Ancient Dragon
…implies, and that link explicitly states,
pair
required two objects, not one as …something else. [code] const int student_size = 12;
pair
<int,int>* array[student_size]; for (int…< student_size; i++) array[i] = new
pair
<int,int>(1,i); // Construct each new…
pair
and give its address to an index…
Re: pair
Programming
Software Development
17 Years Ago
by Joatmon
…do is this: [CODE] int main() { const int SIZE = 8;
Pair
<int> * pairs[SIZE]; // Declare an array of pointers… to
Pair
<int> for (int i = 0; i < SIZE…; i++) pairs[i] = new
Pair
<int>(1,i); // Construct each new
pair
and give its address to an…
Re: pair
Programming
Software Development
17 Years Ago
by nurulshidanoni
…;iostream> usingnamespace std; { const int students.size = 12;
Pair
<int> * pairs[students.size]; // Declare an array of… pointers to
Pair
<int> for (int i = 0; i <…size; i++) pairs[i] = new
Pair
<int>(1,i); // Construct each new
pair
and give its address to an…
Re: pair
Programming
Software Development
17 Years Ago
by nurulshidanoni
…in StudentID | +--------------------------------------------------------------------------------------------*/ { const int student_size = 12;
Pair
<int> * pairs[student_size]; // Declare an array… of pointers to
Pair
<int> for (int i = 0; i …
pair
Programming
Software Development
17 Years Ago
by nurulshidanoni
How to make a
pair
programming.. like I have 1 2 3 4 5 6 7 First, I want to make a
pair
of 91,20 (1,3) (1,4) (1,5) using i=1, i<9,i++
Re: pair
Programming
Software Development
17 Years Ago
by nurulshidanoni
error C2976: '
pair
' : too few template arguments see declaration of '
pair
' Why there is too few template arguments when i delete line 3?
Re: pair
Programming
Software Development
17 Years Ago
by nurulshidanoni
… requires array or pointer type error C2061: syntax error : identifier '
Pair
' error C2109: subscript requires array or pointer type error C2227…
Re: pair
Programming
Software Development
17 Years Ago
by Ancient Dragon
because you didn't do it right. [URL="http://www.google.com/search?hl=en&q=std%3A%3Apair"]google for std::
pair
[/URL]and read how to use it.
pair<> and structs
Programming
Software Development
15 Years Ago
by ENCHTERP
Hello what would be the best way to return a
pair
<> via a structure Let me further explain. Below … use: //compass.h struct Compass {
pair
<int, int> C;
pair
<int, int> E;
pair
<int, int> W…;
pair
<int, int> NE;
pair
<int, int…
pair number
Programming
Software Development
7 Years Ago
by Liviniesh
…method as described below: public
Pair
(double aFirst, double aSecond) {...} /** Constructs a
Pair
object parameter aFirst the first …value of the
pair
parameter aSecond the second value of the
pair
*/ Then write a program… in two numbers (from standard input) constructs a
Pair
object, invokes all of its methods and prints the…
Pair-ups Game Related
Programming
Web Development
13 Years Ago
by spixy
… first text-area to the 2nd.. 5. set up the
pair
-ups 6. print the pairups btw., here is how the…
pair template in c++11
Programming
Software Development
10 Years Ago
by aluhnev
…> using namespace std; int _tmain(int argc, _TCHAR* argv[]) {
pair
<int, string>p(42, "forty-two"…
Re: pair
Programming
Software Development
17 Years Ago
by nurulshidanoni
I dont understand
Re: pair
Programming
Software Development
17 Years Ago
by Joatmon
If you do not understand what pointers are or how they work, it would not be fitting to describe every aspect of them in this thread. I will however give you a good tutorial on pointers, and when you practice with their examples, you should have a decent grasp of them, then you may come back to the example I gave previously and it should seem more…
Re: pair
Programming
Software Development
17 Years Ago
by Joatmon
Can you post your source now please? (and edit out the big error list, it is mostly the same error over and over again and is just a big waste of space) I will see what you have and try to help you out.
Re: pair
Programming
Software Development
17 Years Ago
by Joatmon
1. Did you make sure you kept what you had in front of main? I remove that from the code i posted as it is the same as you had, only the things in main were what i changed. 2. students.size is referring to a data member of an object that doesn't exist. Moreover, since it would be a data member inside an object, it couldn't be declared again. Use a…
Re: pair
Programming
Software Development
17 Years Ago
by nurulshidanoni
Thank you ancient dragon. It succefully work out!!!!
Last CLASS method needs help... PAIR::area()
Programming
Software Development
18 Years Ago
by ToySoldier
… a; int b; public: void print();
PAIR
();
PAIR
(int);
PAIR
(int,int); ~
PAIR
(); void swap(); int diff(); int big(); …quot; " << b << endl;}
PAIR
:: ~
PAIR
() { cout << "Display Destructor Message"… << endl; }
PAIR
::
PAIR
(int p1) {a=p1; b=p1;}
PAIR
::
PAIR
(int p1,int p2) { a…
error C2955: 'Pair' : use of class template requires template argument list
Programming
Software Development
15 Years Ago
by Cristofor
… getmax (); }; template <class T> T
pair
::getmax (){ T retval; retval = value1>value2? value1… : value2; return retval; } int main () {
pair
myobject(100,75); cout << myobject.getmax(); …1> Reason: cannot convert from '
pair
' to '
pair
<T>' 1> Conversion …
Cannot get PAIR::big to just display greater number
Programming
Software Development
18 Years Ago
by ToySoldier
… a; int b; public: void print();
PAIR
();
PAIR
(int);
PAIR
(int,int); ~
PAIR
(); void swap(); int diff(); int big(); … " << b << endl; }
PAIR
:: ~
PAIR
() { cout << "Display Destructor Message" &…lt;< endl; }
PAIR
::
PAIR
(int p1) { a=p1; b=p1; }
PAIR
::
PAIR
(int p1,int p2) { a…
Re: Cannot get PAIR::big to just display greater number
Programming
Software Development
18 Years Ago
by ~s.o.s~
… int a; int b; public: void print();
PAIR
();
PAIR
(int);
PAIR
(int,int); ~
PAIR
(); void swap(); int diff(); int big(); int area…quot; " << b << endl; }
PAIR
:: ~
PAIR
() { cout << "Display Destructor Message" <&…lt; endl; }
PAIR
::
PAIR
(int p1) { a=p1; b=p1; }
PAIR
::
PAIR
(int p1,int p2) { a=p1…
Re: Last CLASS method needs help... PAIR::area()
Programming
Software Development
18 Years Ago
by ~s.o.s~
…]. [code] class
PAIR
{private: int a; int b; public: void print();
PAIR
();
PAIR
(int);
PAIR
(int,int); ~
PAIR
(); void swap(); int…quot; " << b << endl;}
PAIR
:: ~
PAIR
() { cout << "Display Destructor Message" &…lt;< endl; }
PAIR
::
PAIR
(int p1) {a=p1; b=p1;}
PAIR
::
PAIR
(int p1,int p2) { a=…
Re: STL map and pair causing memory access error
Programming
Software Development
15 Years Ago
by shamiliroy
… int insert( keyType1_t keyVal, dataType1_t& info_t) {
pair
<map<keyType1_t,dataType1_t>::iterator,bool> retItor…; retItor = InfoMap_obj.insert(
pair
<keyType1_t, dataType1_t>(keyVal, info_t ) ); if ( …
Re: error C2955: 'Pair' : use of class template requires template argument list
Programming
Software Development
15 Years Ago
by thomas_naveen
Change the getmax implementation as [CODE]template <class T> T
pair
<T>::getmax (){[/CODE] In main use [CODE]
pair
<int> myobject(100,75);[/CODE] Also rename
pair
as pair1, as there is a naming conflict in std namespace. (else remove using and use std:: as required)
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC