do_ not declared in this scope
Lost on this part of the code. const struct editor_cmd_type editor_table[] = { /* { command function }, */ { "area", do_aedit }, { "room", do_redit }, { "object", do_oedit }, { "mobile", do_medit }, { ...
Lost on this part of the code. const struct editor_cmd_type editor_table[] = { /* { command function }, */ { "area", do_aedit }, { "room", do_redit }, { "object", do_oedit }, { "mobile", do_medit }, { ...
Does anyone know a resource where we can obtain FREE C++ libraries for MATLAB functions? For example, linear algebra problems can be solved using LAPACK and BLAS. Also, MATLAB in a .NET project is out of the question - I'm talking about direct C++ implementations of popular MATLAB functions (I don't know which functions I need in C++ ye...
I am curious how spy++ Finder Tool finds out the window handle for the window over which the mouse is. Is there any WIN32 function for getting the handle of the topmost window that occupies a certain pixel on the display? ...
Hi, i am using vb.net and i would to send some structs to a C++ tcp server. The problem is the structs i am sending might contain other structs. Struct{ uint length; byte really; customStruct customStuff; }FirstStruct; Struct{ uint length; char[] name; }CustomStruct; Lets say i want to send FirstStruct over to the C++...
typedef boost::shared_ptr<config_value_c> config_value_ptr; typedef std::vector<config_value_ptr> config_value_vec; config_value_vec config; typeof (config.iterator ()) it = config.iterator (); I want to extract an iterator to an array of boost pointers to class config_value_c. I know I can specify the iterator as std::vector<config...
I have an assignment where I must output the number of comparisons that are made with the Merge sort algorithm, against an int list[1000] filled with random values (no duplicates). My main question is, have I placed my comparisons++ count incrementer in the correct place. Here is the code I am using int Sort::MergeSort(int* list, int ...
I'm trying to compare a character array against a string like so: const char *var1 = " "; var1 = getenv("myEnvVar"); if(var1 == "dev") { // do stuff } This if statement never validates as true... when I output var1 it is "dev", I was thinking maybe it has something to do with a null terminated string, but the strlen of "dev" and v...
Mentally, I've always wondered how try/throw/catch looks behind the scenes, when the C++ compiles translates it to assembler. But since I never use it, I never got around to checking it out (some people would say lazy). Is the normal stack used for keeping track of try's, or is a separate per-thread stack kept for this purpose alone? Is...
I found the following rule in a coding standards sheet : Do not rely on implicit conversion to bool in conditions. if (ptr) // wrong if (ptr != NULL) // ok How reasonable/usefull is this rule? How much overload on the compiled code? ...
if( (A) && (B) ) { //do something } else //do something else The question is, would the statement immediately break to else if A was FALSE. Would B even get evaluated? I ask this in the case that B checking the validity of an array index say array[0] when the array is actually empty and has zero elements. Therefore throwing a ...
Hi, I just stumbled a c++ code with a calling of a class name in the upper part of the header file for example class CFoo; class CBar { .... }; My question is, what is class CFoo for? Thanks alot! ...
int is usually 32 bits, but in the standard, int is not guaranteed to have a constant width. So if we want a 32 bit int we include stdint.h and use int32_t. Is there an equivalent for this for floats? I realize it's a bit more complicated with floats since they aren't stored in a homogeneous fashion, i.e. sign, exponent, significand. ...
Hello. I'm trying to debug shell extension (IContextMenu) in Windows 7 with Visual C++ 2008. I have set DesktopProcess=1 in the registry and set host app to explorer.exe. But when I start the debugger, it launches explorer.exe and then detaches from the process. DllMain of the shell extension isn't called. The same code with exactly th...
My understanding is that when you kill a C++ application through Task Manager in Windows XP, the application is still "cleanly" destructed - i.e. the call stack will unwind and all the relevant object destructors will be invoked. Not sure if my understanding is wrong here. Is it possible to kill such an application immediately, without...
For class specific new_handler implementation, i came across the following example in book "effective c++". This looks problem in multithreaded environment, My Question is how to achieve class specific new_handler in multithreaded environment? void * X::operator new(size_t size) { new_handler globalHandler = // insta...
I am in a situation where I am extremely bandwidth limited and must devote most of the bandwidth to transferring one type of measurement data. Sometimes I will be sending out lots of this measurement data and other times I will just be waiting for events to occur (all of this is over a TCP socket). I would like to be able to stream o...
I'm having some problems implementing an algorithm to read a foreign process' memory. Here is the main code: System.Diagnostics.Process.EnterDebugMode(); IntPtr retValue = WinApi.OpenProcess((int)WinApi.OpenProcess_Access.VMRead | (int)WinApi.OpenProcess_Access.QueryInformation, 0, (uint)_proc.Id); _p...
What the title says. Are they the same? I've noticed that the first does have arguments and such, but are they going to give the same end result? ...
One cell in each row of a QTableWidget contains a combobox for (each row in table ... ) { QComboBox* combo = new QComboBox(); table->setCellWidget(row,col,combo); combo->setCurrentIndex(node.type()); connect(combo, SIGNAL(currentIndexChanged(int)),this, SLOT(changed(int))); .... } In the handler function ...
I am building an application in C++ which uses sqlite3 as an embedded database. The source for sqlite3 is distributed as an amalgamated source code file sqlite3.c and two header files. What are the relative advantages or disadvantages of linking the sqlite3 code directly into my program binary versus compiling sqlite3 as a static libra...