I have a large MFC C++ application that I would be very keen to port into AutoCAD and IntelliCAD. AutoDesk offer Object ARX for this purpose, which replaces the older and slower ADS technology. IntelliCAD, afaik only supports ADS. Has anyone out there done this, and if so which tools did you use and what pitfalls did you encounter?
I...
I wanted to know how the following works @ compiler level.
int const iVal = 5;
(int&)iVal = 10;
A bit of m/c or compiler level answer would be great full.
Thanks in advance.
...
The folowing code generates a syntax error at the line where the iterator is declared:
template <typename T>
class A
{
public:
struct B
{
int x, y, z;
};
void a()
{
std::map<int, B>::const_iterator itr; // error: ; expected before itr
}
std::vector<T> v;
std::map<int, B> m;
};
This o...
class A was using below two functions to build and send messages 1 & 2
builder::prepareAndDeliverMsg1(msg1_arg1,msg1_arg2)
{
}
builder::prepareAndDeliverMsg2(msg2_arg1,msg2_arg2)
{
}
Now, a new class B is introduced, which would like to do what A was doing in two stages
stage1->prepare
stage2->deliver
I was thinking to extend the ...
Im looking to see if there are any pre-existing projects that do this.
Generally, I need something that will load in a c++ file and parse it and then based on a set of rules in script, transform it, say to add headers, reformat, or remove coding quirks for example, turning const int parameters in functions to int parameters, etc Or perh...
How we can implement our own timer function in Windows without using Library functions? Should we deal with assembly language instructions?
...
Using apache on a windows server with mod_fastcgi, the C code looks like that:
void main() {
init();
while (FCGI_Accept() >= 0)
work();
cleanup();
}
When the service is taken down (i.e.: net stop apache2), the process terminates without getting to the cleanup code.
What am I missing here?
...
Hi, this is a "hard" question. I've found nothing interesting over the web.
I'm developing a Memory Management module for my company. We develop games for next-gen consoles (Xbox 360, PS3 and PC... we consider PC a console!).
We'll need in future, for our next games, to handle texture streaming for large game worlds that cannot be load...
How could I prevent esc from closing a dialog box?
I searched for this topic, but all I found was for MFC (You can overwrite PreTranslateMessage function in MFC). but my program is written in Windows API, not MFC.
I tried to catch all Keyboard messages in Dialog procedure, but none of them works. I also tried using subclassing in dialo...
We have a third party device we are trying to integrated into our system and one of the things our code should do is start a hardware reset by asserting a reset pin. One of the documents mentions the pin being released before the end of POR. I bit of Google has given me this but I just wanted to confirm and understand if I am on the corr...
I know that WIN32 is obviously to denote win32 compilation but what is the need for _win32?
...
Sometimes I'm solving problems on projecteuler.net. Almost all problems are solvable with programs, but these tasks are more mathematical than programmatical.
Maybe someone knows similar sites with:
design tasks,
architecture tasks,
something like "find most elegant C++ solution"?
...
I need to quickly implement a very small C or C++ TCP server/client solution. This is simply to transfer literally an array of bytes from one computer to another - doesn't need to be scalable / over-complicated. The simpler the better. Quick and dirty if you can.
I tried to use the code from this tutorial, but I couldn't get it to build...
Greetings Everyone,
I'm in a bit of a fiddle in that I dont know why my code brings up the following error when compiling:
1>..\SA.cpp(81) : error C2664: 'CFE' : cannot convert parameter 1 from 'int' to 'int []'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Esse...
I am making an old-school 2d game, and I want to animate a specific color in my texture.
Only ways I know are:
opengl shaders.
animating one color channel only.
white texture under the color-animated texture.
But I don't want to use shaders, I want to make this game as simple as possible, not many extra openGL functions etc..
And t...
I am working on embedding winform controls into an ATL dialog (see here for how I did so far).
Now I have encountered a rather strange problem.
For some reason, the text fields in my winforms display fine, but I am unable to change the text in them by typing on the keyboard.
However, I can copy and paste text from elsewhere into the te...
Duplicate:
Good Programming Practices for Macro Definitions (#define) in C
C (and by extension C++) macros are laden with pitfalls and practical problems when not implemented properly.
Take, for example, the macro
#define cube(x) x*x*x
What is wrong with it?
Where will it fail?
When can unexpected results be returned?
What is ...
In C++ I want to read individual pixel values from DICOM images.
...
I just read in the C++ standard that std::for_each is a non-modifying sequence operation, along with find, search and so on. Does that mean that the function applied to each element should not modify them? Why is that? What could possibly go wrong?
Here is a sample code, where the sequence is modified. Can you see anything wrong with it...
C# has a syntax feature where you can concatenate many data types together on 1 line.
string s = new String();
s += "Hello world, " + myInt + niceToSeeYouString;
s += someChar1 + interestingDecimal + someChar2;
What would be the equivalent in C++? As far as I can see, you'd have to do it all on separate lines as it doesn't support mul...