Search:
Type: Posts; User: potatoCode
Search:
Search took 0.26 seconds.
-
January 15th, 2012, 11:21 AM
no it doesn't
a type trait class is a tracer and tracing something works best decoupled from what it's supposed to trace or encapsulated for a single purpose. in term of class design, the only...
-
January 15th, 2012, 10:40 AM
if you don't know what indicates the end of the input, your program won't either now won't it?
-
January 15th, 2012, 10:39 AM
the first one is a big no no and the second doesn't make sense.
Windows is Message-driven, with that in mind pick one that best suit your needs
Design Patterns
-
October 11th, 2010, 03:04 PM
If the array doesn't have to be a tree, then here is an example of a simple dynamic multiarray of any length
#include <iostream>
#include <algorithm>
#include <functional>
#include <numeric>...
-
October 7th, 2010, 11:09 AM
In general, do/while(0) completes the function block and enforces the scope
#define INT_SWAP(x, y) { int t = x; x = y; y = t; }
If this macro is preceeded by an expression statement that requires...
-
October 7th, 2010, 03:31 AM
I assume this is all a part of the implementation detail and that such a rare need is for your own purpose only, otherwise not only you're forcing your user to know the guts of what is supposed to be...
-
October 7th, 2010, 03:09 AM
There are benefits for having an array in a linked-list. For starters, it is much easier to manage pointers, implementing reference count such as weak reference that would be difficult without it,...
-
October 6th, 2010, 12:40 PM
Yep.
The zero you talked about when you said 1/0 is defined in math and the zero you used in your example code are not the same,
with the latter being non-atomic producing implementation defined...
-
October 5th, 2010, 09:53 PM
When the element in the vector(unlike std::list or deque) is erased, all the references of the iterators starting from the position erased no longer point to the same memory block. The rationale...
-
October 5th, 2010, 06:52 PM
And the names of such remarkable institutions of scholar is...?
1/0 is undefined in algebraic term, the calculus theorem of the quotient ricocheting to the black hole as it is being eaten by another...
-
October 4th, 2010, 08:00 AM
Hm, I don't know C--, but that doesn't look quite right to me. If all the conditions (access criteria) have their own keys and these keys are up for grasp for any client thread without any...
-
October 2nd, 2010, 04:40 PM
That's a bad idea. The best match-case was already provided by superbonzo, there's no need to break the fundamental rule of object instantiation for the sole purpose of passing two parameters to the...
-
October 2nd, 2010, 08:25 AM
Nothing is easy, don't ever take things for granted.
Next, properly indent the code as it still is a bit messy to read.
Third, when you compile this code, what's the first error message you...
-
September 30th, 2010, 12:03 PM
What's that?
well, you already know how to assign a pointer
#include <iostream>
namespace demo
{
std::ostream& os = std::cout;
-
September 28th, 2010, 02:39 PM
The ifdef approaches safeguards Your code from breaking, not the actual data your app is supposed to take care of. My first contact with the UNICODE concept was through the Charles Petzold book....
-
September 27th, 2010, 01:35 PM
The initializer list is supposed to work but I don't know if gnu has implemented such an experimental feature or not. A constructor initializer sequence is still under debate, is it not? (somebody...
-
September 26th, 2010, 12:04 PM
I think you're being taught things backwards xD
If I got you right, you want a recursive function to work with the array, and the class Node is capable of knowing whether it is sitting in the last...
-
September 26th, 2010, 08:15 AM
Unlikely.
Each character is assigned a unique integral value, of which the representation is known as 'chracter mapping.' ASCII is usually a single byte(7 or 8 bit) whereas UNICODE is either 2 or...
-
September 26th, 2010, 07:41 AM
A thing to remember when you work with the built-in array is that the array decays to a pointer when passed to a function. Here's a little demo
#include <iostream>
// This is a POD
struct...
-
September 25th, 2010, 10:06 AM
Haha. I meant nesting function CALLS
But that 's' at the end of the word function was surely misleading
-
September 25th, 2010, 10:05 AM
and here's the link to Zuk's explaination.
Why do I get linker errors when I use template friends?
-
September 24th, 2010, 09:00 AM
I agree with monarch_dodra on going with what is accepted at the working environment.
There's one thing that I can't quite decide which way to go, i.e.
// case 1
template <typename Type>...
-
September 20th, 2010, 10:21 PM
struct myShortAndIntStruct
{
short int myShort : 16;
int : 0; //Anonymous member of size 0: Forces alignment of next member
long int myInt : 32;
};
To OP, as carefully...
-
September 20th, 2010, 10:07 PM
Looks like you got a wrong footing and digging at all the wrong places.
Variable variables in PHP is a dynamic binding. Pointers drive the dynamic bindings in C++ so that's where you will likely...
-
September 18th, 2010, 09:38 PM
First, this is not a template related problem.
if-else is conditional statements for which the compiler must account for EVERY probabilities.
The error message is saying that the compiler is...
|
Click Here to Expand Forum to Full Width
|