Search:
Type: Posts; User: treuss
Search:
Search took 0.25 seconds.
-
September 13th, 2012, 06:52 AM
My 2c:
Understanding pointers, classes, objects and arrays are the very basic things. If you fail to show that you 100% understand those, you will fail the interview
Hardly any company will want to...
-
September 11th, 2012, 01:50 AM
You need to decide, which part of your union you want to assign values to:
EntryHeader entry;
entry.uuid.ll = {0u, 4294967295u};
entry.uuid.byte = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};...
-
August 20th, 2012, 08:04 AM
Your algorithm returns true for angle1 = 170 and angle2 = -170 (distance 20°) but false for angle1 = 10 and angle2 = -10 (also distance 20°). So I would say, your algorithm is flawed.
-
August 15th, 2012, 11:05 AM
Thanks Superbonzo!
I was trying the same approach, i.e. using a generic class to wrap around the function(s) but always ended up with the same problem, i.e. how to pass the function as a template...
-
August 15th, 2012, 05:06 AM
Correct syntax would be something like:
while(! getdata.eof()) {
string s;
getline(getdata, s, ',');
v_input.push_back(s);
}
-
August 15th, 2012, 03:56 AM
Hi all,
I have in the past written code for templated functions where one function argument can be either a function pointer or a Functor. Works pretty straightforward.
Now I am in a situation...
-
August 2nd, 2012, 03:12 AM
To make one thing clear: Your programm cannot know, where the "Tuesday" section starts without reading the file from beginning until it finds Tuesday. So to read only the Tuesday section, you have...
-
July 26th, 2012, 08:04 AM
Nope, you won't get the program to print one of the strings "hourly", "monthly" or "weekly" unless you tell it to.
An enum will internally be an integer, so everytime you write in your code hourly...
-
July 25th, 2012, 10:38 AM
Can be done, but why?
Why not just read the floating values:
std::ifstream input("test.txt");
double d;
while (input >> d) {
std::cout << "Read " << d << "\n";
}
-
void push(int)
int pop();Why "int" if you want to push/pop objects of class C?
-
June 29th, 2012, 02:02 AM
D'oh! Knew it was something stupidly simple.
Hmm, that's what I assumed and tried but it gave me "the pure virtual method called" error, so I thought I was truncating the derived classes to their...
-
June 28th, 2012, 04:59 PM
I'm trying to implement a class hierarchy and a wrapper class with a pointer to the base class. The base class has operator< overloaded and the implementation makes use of virtual functions as some...
-
Thanks Superbonzo for both posts.
Overloading indeed solves my problem, but iirc, combining overloading and template specialization causes some difficult to predict behaviour (depending on the...
-
If your images are jpegs (or in a similar format), scaling might not be the only problem but also the lossy compression algorithm being used will likely have an even higher impact. Try opening a png...
-
Hi,
I'm trying to get template specializations working for char * as well as for char[]. I.e. in the following code the last test does not use the specialization and fails:
#include <string>...
-
April 13th, 2012, 02:28 AM
If you look closely, you will see that the error message is actually coming from /bin/sh and the error reads:
-spec: command not found
So, some line in your make file evaluates to starting with...
-
April 2nd, 2012, 10:34 AM
Check this post (from a long time ago). The example assumes though that your first program spawns the second one.
-
March 20th, 2012, 08:16 AM
Hi,
the constructor tuple::tuple(P1, P2, ...PN) is explicit.
std::tuple<std::string, std::string> b{"Richards","BCPL"};
Here you are explicitly calling the constructor.
...
-
September 30th, 2010, 08:04 AM
All advanced cryptology works on large (incredibly large) numbers. So the text you encrypt is interpreted as a bunch of bytes forming a large number and likewise the encrypted message is a large...
-
June 22nd, 2010, 08:14 AM
If the object contains a body, an octant and 8 objects, each of them containing a body, an octant and 8 objects, each of them containing a body, an octant and 8 objects, each of them ..... I don't...
-
You can change the default message queue size in Linux by changing /proc/sys/kernel/msgmnb.
Example:
echo "4294967295" >/proc/sys/kernel/msgmnb
-
This will not loop at all. It would have to compile first before looping.
-
AFAIK, std::map does not declare a virtual destructor (in the implementation I have at hand, it does not declare a destructor at all). So publicly deriving a class (in this case mysql_map) from it is...
-
In Bugzilla you certainly can attach files. It might be that you first need to submit the report though.
Check some of the existing bugs: There's a "Create a new attachment" link.
...
-
Read it into an unsigned char, then cast it to an unsigned int for output.
|
Click Here to Expand Forum to Full Width
|