Type: Posts; User: monarch_dodra
Search took 0.08 seconds.
August 21st, 2014, 07:58 AM
It almost works yeah. There are 2 issues: append accepts a "const char*", but you are giving it an "unsigned char*", so you will have to cast that. Furthermore, the fact that you have an "unsigned...
August 21st, 2014, 04:04 AM
I didn't go into full details of your post, but it sounds like you are tyring to use some kind of dictionary-like data structure, that would map, say a threshold (50 for pw50), which would map to the...
August 20th, 2014, 08:32 AM
The big question here is not how you convert from one container type to another, but rather, how will you be converting the elements themselves, eg: vector<unsigned char> to unsigned char*.
August 20th, 2014, 06:49 AM
Meh. Personally, I don't believe you could say either way based off of type alone, but rather "what" you consider the argument is. As you say, a pointer is itself both a value, and a reference to...
August 19th, 2014, 10:17 AM
Are you kidding? I mean, seriously? The answer is in the reply you *just* quoted:
How can you not understand this?
August 19th, 2014, 06:35 AM
r is passed by value, so any changes to r itself will not be seen at the end of the call: Even if in "reverseStr", r points to the middle of the string, the one in main will be unchanged.
August 15th, 2014, 07:33 AM
Homework? C or C++? What are your interface needs (std::string? in-place editing? malloc? static buffer?)?
Also, please clarify what it is your function should do:
i need to pass input as...
August 15th, 2014, 07:29 AM
This is a strange question, in regards that you already said "I want it to get rid of any line that contains a word that isn't in an English dictionary".
Please clarify your needs. For example,...
August 4th, 2014, 09:37 AM
You are supoosed to *declare* your functions with dll import/export in your .h), and the *define* them without dll import/export (in your cpp).
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:
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.