Type: Posts; User: 2kaud
Search took 0.05 seconds.
Having a question like this as part of a written exam IMO serves no really useful purpose and doesn't do much for evaluating pupils understanding. It would be better if this type of question was...
Do you have any other cerr statements that get executed before this one? What happens if you put a cerr << "cerr here"; statement immediately prior to the cerr causing the problem?
How do you know - and how do you know it's not the flush that's causing the problem? Have you used the debugger to trace through the if block? What happens if you put a cout statement immediately...
The other questions is: Why write code like this? What's the purpose? It looks like 'c' code for returning values as part of a function argument without using pass by reference. This isn't good c++...
December 2nd, 2013, 05:15 PM
Template arguments must be able to be evaluated at compile time so that the compiler can create the required instantiation of the template.
December 2nd, 2013, 09:21 AM
The last post there may be of interest.
December 2nd, 2013, 06:53 AM
Have a look at pshutdown command from SysInternanls
particularly the -o option.
Also have a look at
December 2nd, 2013, 06:28 AM
No documented method - and as Ignor correctly points out in post #7, stay well clear of undocumented ways.
If you find a workstation locked, rather than logoff what about reboot?
December 1st, 2013, 06:11 PM
Consoles handle logoff/shutdown queries via CTRL_SHUTDOWN_EVENT or CTRL_LOGOFF_EVENT notifications which should be processed in the console's handler routine (if the console program is well...
December 1st, 2013, 08:03 AM
You don't say why you want to learn c++. If it is for grame programming, then I would suggest
Beginning c++ through Game Programing....
December 1st, 2013, 07:29 AM
I agree, as per my previous post #2, but I still think that a basic understanding of WIN32 programming is very helpful for gui programming using frameworks such as MFC.
December 1st, 2013, 07:13 AM
December 1st, 2013, 07:05 AM
As far as I am aware, there is no way for one program to know if other programs have unsaved open files (although you can find out which files are open). It is up to the individual programs what to...
November 30th, 2013, 06:04 PM
NB to my post #2. Note that if you are using the free Visual Studio Express (as opposed to the paid versions), it doesn't come with MFC.
November 30th, 2013, 05:16 PM
Basic Windows programming resolves around the WIN32 set of APIs that can be used from c/c++ programs. The best book to start with is programming Windows by Charles Petzold...
November 30th, 2013, 07:10 AM
I'm going to have to revise my Knuth. I'd forgotten about that.:cool:
November 29th, 2013, 05:15 PM
IMO he is. He's mentioned his 'new language' from almost his very first post in these forums. I thought he was going to write a compiler/interpreter in c++ for this language. But it seems the plan is...
November 29th, 2013, 02:45 PM
Yes, but why do you want to do this - what are you trying to accomplish? c++ is a typed language.
November 29th, 2013, 02:35 PM
For help with C2143 see
if you posted the code we could provide more guidance. When posting code, please format it properly...
November 29th, 2013, 12:04 PM
Data is stored in a file as a sequence of bytes where each byte is 8 bits and each byte has a maximum decimal value of 255. You need to read these bytes as binary sequentially and store them into an...
November 29th, 2013, 06:01 AM
A couple of points about your exportmain.cpp.
# include <tchar.h>
# include <crtdbg.h>
November 29th, 2013, 05:11 AM
At a high level, could you describe what you are trying to achieve? Some guru's guru may be able to provide guidance on design etc.
November 28th, 2013, 05:55 PM
But why are you doing all this 'messing about' with void pointers? If you just pass void pointers, then somewhere you are still going to have to decide what type they should be before you do anything...
November 28th, 2013, 05:46 PM
cout must know the type of the argument the value of which it is to display. You can overload the operator << to enable cout to display a type of which it doesn't know already - but in the code for...
November 28th, 2013, 05:20 PM
b is a vector of int. So &b is the address of a vector of int. So d is an address of a vector of int. You are trying to assign type of address of a vector of int to a type of class variant. This...
Click Here to Expand Forum to Full Width