Type: Posts; User: D_Drmmr
Search took 0.07 seconds.
April 17th, 2014, 04:37 AM
Could you please fix the compiler errors, such that people can just copy-paste the code if they want to run it?
What about the serialization "does not work"?
April 11th, 2014, 02:26 AM
Please use code tags! Your code is practically unreadable without them.
Did you step through your code with the debugger? What values are you getting for x and y?
April 11th, 2014, 02:25 AM
That's horrible. Why would you advice someone to use a macro for this? A simple text-replace can solve this without obfuscating the code.
@OP Using two different names for the same variable will...
April 9th, 2014, 01:37 AM
What do you mean with "doesn't work"?
April 9th, 2014, 01:34 AM
That doesn't look like the rotation axis. When rotating about an axis, all point on the axis remain in the same location.
April 9th, 2014, 01:29 AM
Is there an RSS feed to get notifications?
What kind of platform do you want to run on?
April 7th, 2014, 08:55 AM
You could always call the algorithm with a pair of boost::zip_iterators. You'll need to write a custom (or generic reusable) comparator though, which is not so nice without having support for generic...
April 5th, 2014, 12:54 PM
In C++ I would recommend using this instead:
template<typename T, size_t N>
It's much harder to use incorrectly.
April 2nd, 2014, 04:35 AM
Yes, it's a possible way to tackle the problem. You can model the problem as a longest path problem by representing each (unique) input string as a node in the graph and adding edges between any pair...
April 1st, 2014, 01:35 PM
That doesn't seem like an exact definition of the solution. You'll need to define formally what you mean with "longest possible runs". Is a solution with three runs of length 8, 5, 3 better or worse...
April 1st, 2014, 03:33 AM
There is always std::make_pair(...) to prevent some repetition.
I think in this case overload resolution would pick the non-template overload, so it would pick the (key_type, mapped_type)...
March 31st, 2014, 08:59 AM
I guess you wanted the <string> header.
void CreateNew(ofstream & FileNew);
void ReadNew(ifstream & FileGet);
March 24th, 2014, 08:58 AM
I'm pretty sure that not returning a value from a function (other than main) that has a return value is undefined behavior.
Probably the compiler created the machine code in such a way that the...
March 12th, 2014, 03:01 AM
You can write a function to find the highest 2 values in a series of values by keeping track of the highest and second highest while iterating over all values.
However, since you already know the...
March 11th, 2014, 07:05 AM
Unless they are defined as static global variables in different compilation units. The keyword static has a different meaning when applied to global variables, than when applied to class/local...
March 4th, 2014, 06:59 AM
Never put a using declaration at global scope in a header file. Every file that includes this header will get that using declaration, which can cause name conflicts.
IMO, it's way easier to learn to...
March 4th, 2014, 06:09 AM
You could write a VBA macro to read the xml file and copy the text in it to the right places.
February 18th, 2014, 09:23 AM
AFAIK, that's not a valid string literal, because it doesn't consist of ASCII characters. You should read up on Unicode encodings.
You should use the Unicode setting unless you want to support...
February 17th, 2014, 01:25 PM
Is it possible to pass this as an argument to the function object?
February 16th, 2014, 10:50 AM
Instead of complaining about others, why don't you have a good look at yourself first? You were able to solve the problem yourself (or at least, without help from anyone here) in 2 hours. Yet you did...
February 10th, 2014, 04:20 AM
What did you think the curve should look like with those control points?
February 8th, 2014, 06:42 AM
That's because you have syntax errors. What is the first error message that the compiler gives you? What's the corresponding line in your code? What is it about the error message that you don't...
February 6th, 2014, 02:57 AM
AFAIK, it's Microsoft specific. strncpy is standard.
February 5th, 2014, 01:37 AM
1. Please use code tags. Your code is unreadable without them.
2. Does the code you posted actually replicate the problem?
3. You are using uninitialized variables. j is never assigned a value....
January 27th, 2014, 05:40 AM
Then either you need to change the project specs or you need to learn C++ if you want to achieve anything. You cannot bluff your way through C++. It is completely unlike the languages you mention,...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.