Type: Posts; User: monarch_dodra
Search took 0.08 seconds.
July 22nd, 2014, 06:12 AM
I see. That's interesting.
Well, I think I have my answers in regards to the original issue. Thanks all.
July 18th, 2014, 08:15 AM
Sounds like homework. In any case, it's a simply recursive calls crazy in a tree like fashion, "in-order".
Simply tracing your code with a pen and paper would help here:
July 17th, 2014, 02:50 PM
With my MinGW, both std=c++98 and std=C++11 produce the same output. Were namespace rules changed with C++11? I am not aware of any changes being made to them with this latest release. Are you...
July 17th, 2014, 12:55 PM
Yeah, but it still creates a block you have to track where it opens and closes. Not a huge deal, I agree, but it feels a bit messy.
Really? Because that doesn't compile for me...
July 16th, 2014, 08:20 AM
It has recently been brought to my attention that it is possible to use a namespace as a "qualifier" in the signature of a definition as opposed to using a block. EG:
//Begin declarations here...
April 19th, 2014, 01:57 AM
Thank you very much (both). That was a real complete and helpful answer.
April 15th, 2014, 12:05 PM
Well, S isn't necessarily something I own. And if at all possible, I'd rather it stay a POD.
April 14th, 2014, 04:52 AM
I'm wondering what is the "best" way to initialize a bitfield struct. I have this bitfield, defined as:
unsigned int a : 1;
unsigned int b : 1;
If I'm "using" the...
April 25th, 2013, 10:13 AM
Interesting. Good point.
Ah... Now THERE is a good solution... Unfortunately, I gave you a reduced use case. Inside actual code, the "-" is (potentially) at call site:
April 24th, 2013, 04:06 AM
I'm porting a macro from VS to GCC. The macro is pretty trivial: Take A and B, and create "A-B":
#define QUOTE1(A) #A
#define QUOTE2(A, B) QUOTE1(A##-##B)
March 18th, 2013, 09:28 AM
That'd be my "go to" solution, if it was legal C++.
error: a storage class can only be specified for objects and functions
VStudio compiles, but emits:
warning C4091: 'static ' :...
March 15th, 2013, 09:48 AM
March 15th, 2013, 09:00 AM
Hi all (long time no see)
I've been wondering about something for a while:
Is it possible to declare a struct/class, in a cpp file, designed for local use, but with internal linkage?
January 24th, 2013, 04:22 AM
You could try the "update the return value as you go" scheme:
ReturnType return_val = a;
return_val = b;
November 23rd, 2012, 09:08 AM
I wanted to add to always, always, be very very careful with values "that can only hold two states". Unless your variable actually holds a representation of "true/false", more often that not, it ends...
August 23rd, 2012, 12:33 PM
"app (append) : Set the stream's position indicator to the end of the stream before each output operation."
You want ate:
August 20th, 2012, 10:14 AM
In this case "MyConst" will probably get inlined anyways, but imagining that MyConst was complex, then the usual method is to create a "non template X" where x is one of:
August 20th, 2012, 10:03 AM
Your logic is wrong. I agree with 1 and 2, but 3 is in direct conflict with 2.
By making all your methods virtual, you are allowing users to "hijack" them by over-riding them. Once you have...
July 15th, 2012, 04:29 PM
"in the 2nd case the value of the char dlm will be set only when the if statement holds true".
"otherwise it should be undefined": "undefined" is not a special spectral value that crashes a...
July 13th, 2012, 03:05 PM
I wish, but this current project has the following restraints:
1) No templates due to compiler limitations.
2) No non in-house code.
EDIT: 3) No exceptions.
It's basically "C with classes...
July 13th, 2012, 11:59 AM
Move it is then!
July 11th, 2012, 11:15 AM
I am writing a little OS agnostic library for my team for manipulating files.
One such function is used to move/rename files (only files, not dirs). I got into a little argument with a colleague...
July 11th, 2012, 01:30 AM
July 10th, 2012, 01:03 AM
Rule of thumb:
*If it starts with an underscore, then it is not standard.
*If it starts with 2 underscores, then it is not standard, and compiler specific.
If they are templates, then everything goes into .h files. There will be no .cpp file, unless you have parts that don't depend on a parametrized type.
The standard thing to do is usually to put...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.