I learn C++ and COM through the books.
In the IDE MS Visual Studio 2012 I have created new empty C++ project, and added some existing files to it. My CPP file contains #include<iostream> row, but in editor I got such messages:
Error: identifier "cout" is undefined
end
Error: iden...
@TonyTheLion sweet. I have a bitch of a travelling day ahead of me, so probably something like Wednesday. You think you could swing a early finish one day?
@TonyTheLion I have my Irish mobile, which I can email you the number for. Did we say meet in Bristol? so perhaps meet in the station some where. I do have a sim for my work phone (but the phone it self didn't come through yet) so I might be able to contact you. will have to see when I get to England how well it works
@thecoshman oh right. Yes, well email me your phone number then. Bristol yes. Train station sounds good. I may just call you and then we can arrange things on the phone?
I made a very stupid but very simple code: chat.developpez.com/upload/5094fde3370e0/code.html Does somebody understand why it takes 79ms with numTH = 1 and more than 1s with numTH=10 ??? (I precise that my tests are performed onto a 48 proc server)
> Download and launch the installer and follow the instructions on the screen. After installation, a new Platform Toolset will be available in the Property Pages / General / Platform Toolset dropdown called "Visual C++ Compiler November 2012 CTP". After switching to this new toolset in all your projects, do a full rebuild of the solution.
I suggest implementing a whole layer of reflection on C, something like in Obejctive-C, then enumerating all the fields of a structure and sending them a (polymorphic) deepCopy message. Or not. — H2CO38 mins ago
For the assertion to be guaranteed to hold true it's necessary that the multibyte encoding used by c32rtomb() be the same as the encoding used for string literals, at least as far as the characters actually used in the string.
C99 7.11.1.1/2 specifies that setlocale() with the category LC_CTYPE ...
Meh, this answer is going to get half of the bounty.
@R.MartinhoFernandes Because I only remember like half the laws, and only the trivial ones that don't require much. Bind would be combine, return would be future_value. Are those two enough?
because the whole chinese postman problem :3 I know its the Chinese "Postman Problem" not the "Chinese Postman" problem, I just still think it's funny :L
@LucDanton Oh. I guess waking up should be in order... Yeah, I guess so. Though combine(future_value, foo) is not exactly id, it might be close enough, I guess.
The thing is that since the monad is formed by the concept and the operations, and not a class template and the operations, it would have to be id for that concept, which I might not be awake enough to think about how it makes or makes not sense.
I read Scott Meyers article on the subject and quite confused about what he is talking about. I have 3 questions here.
Question 1
To explain in detail, assume I am writing a simple vector<T> class with methods like push_back, insert and operator []. If I follow mayers algorithm, I would ...
A lot of it deals with interacting with memory, and to suddenly have a maximum allocation or maximum index access of '16 bits` could be pretty damaging.
I did also have a typedef size_t lwordto get the native size implementation, and a typedef ptrdiff_t ulword for the native unsigned size implentation, so maybe I could use those instead.
The other side of it is though: is there any real chance of your code being used with an MS-DOS compiler (or something similar)? Are you restricting yourself to a subset of C++ that would work with those ancient compilers in the first place? If not, trying to make this particular part portable to them may be a waste of time.
I don't imagine I'll be working on anything less than an Intel Core Duo anytime soon; the engine right now uses DIrectX level 11 by default (but will throw back to level 9_3 if it can't initialize at 11) and doesn't use any fancy DirectX 11-specific features. ... Yet.
@NeelBasu My immediate reaction is that its very existence is wrong. What are you trying to accomplish? To print things in C++, you normally just want to overload operator<<.
typedef char sbyte; typedef unsigned char byte; typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; typedef long long llong; typedef unsigned long long ullong;
@JerryCoffin But why this is giving compiler error ?
near line 11
It says wrong number of template arguments (1 should be 2) I've supplied 2 arguments `struct BucketHeaderPrinter: public BucketHeaderPrinter<typename T::ancestor<DepthN-1>::Type, DepthN-1>{`
Yeah, looking more carefully, it looks like a compiler problem to me. Doing a quick check, VC++ compiles that much without any problems at all (though it does complain at line 28, saying BucketHeaderPrinter was previously defined).
I've one node that have different ancestor at different level, ancestor<0> is of type A, ancestor<1> is of type B X will have two ancestors A, B Y will have 3 ancestors A, B, C
number of ancestors can be known by T::depth and I want a class having operator() overload of all ancestors of given T
So BucketHeaderPrinter<X> will have operator()(A*), operator()(B*) overloads but BucketHeaderPrinter<Y> will have operator()(A*), operator()(B*), operator()(C*) overloads
design question, let's say my library offers a class X. I use that class X to implement another function "foo" in my library. Though, I need add an extra functionality (function) in foo from X, but I don't want to expose that functionality to somebody else. How would you guys solve that. friends, inheritance?