How do I change properties of buttons within button boxes in Qt4 designer?
I have been searching online now to no avail, but does anyone know how to access a button in a button box ?(created using the "Dialog with Buttons right" template) ...
I have been searching online now to no avail, but does anyone know how to access a button in a button box ?(created using the "Dialog with Buttons right" template) ...
two clients communicate to each other on top of a message layer in the message body, I need include a field pointing to any data type From client A, I send the field as a shared_ptr<TYPEA> to the message layer. I define this field as a shared_ptr<void> in the message layer. But how can I convert this field back to shared_ptr<TYPEA> in ...
Assume you have a class that defines virtual methods with the access specifier public. Can you change the access specifier on your overriden methods? I am assuming no. Looking for an explanation. ...
The definition for make_pair in the MSVC++ "utility" header is: template<class _Ty1, class _Ty2> inline pair<_Ty1, _Ty2> make_pair(_Ty1 _Val1, _Ty2 _Val2) { // return pair composed from arguments return (pair<_Ty1, _Ty2>(_Val1, _Val2)); } I use make_pair all the time though without putting the argument types in angle brackets: ...
i need to resolve a hostname using a specific DNS server like you would in nslookup C:\>nslookup hotname 192.100.10.10 Server: UnKnown Address: 192.100.10.10 Name: hostname.host Address: 192.100.10.14 But ofcourse in return i dont just want the address i want all the values for Server, Address, Name and Address I have looked a...
I couldn't find any free c++ profiler with good interface for vs2005 running on 32bit winxp sp3. is there any free? ...
I'm seeing some different behavior between g++ and msvc around value initializing non-copyable objects. Consider a class that is non-copyable: class noncopyable_base { public: noncopyable_base() {} private: noncopyable_base(const noncopyable_base &); noncopyable_base &operator=(const noncopyable_base &); }; class noncopya...
I recently wrote an implementation of the Canonical Huffman compression algorithm. I have a 500kb test file that can be compressed to about 250kb when running the debug and release builds from within Visual Studio 2008. However when I run the release build straight from the executeable the test file only compresses to about 330kb. I am ...
Hello, I'm trying to try the POCO library. I downloaded the zip file, and opened the vs solution file named "Net_vs90.sln" on VS 2008. When I try to build the solution, I get this ugly error: bla bla bla.... 1>Linking... 1>LINK : fatal error LNK1104: cannot open file 'PocoFoundationd.lib' bla bla bla.... Linkin...
What is the difference between a static array and a dynamic array in C++? I have to do an assignment for my class and it says not to use static arrays, only dynamic arrays. I've looked in the book and online, but I don't seem to understand. I thought static was created at compile time and dynamic at runtime, but I might be mistaken th...
This is my c++ struct (Use Multi-Byte Character Set) typedef struct hookCONFIG { int threadId; HWND destination; const char** gameApps; const char** profilePaths; } HOOKCONFIG; And .Net struct [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct HOOKCONFIG { public int threadId; public ...
I'm using C++ and wondering if I can just send an entire int array over a network (using basic sockets) without doing anything. Or do I have to split the data up and send it one at a time? ...
does std::string store data differently than a char* on either stack or heap or is it just derived from char* into a class? ...
What is the best way to throw exception from the constructor initializer? For example: class C { T0 t0; // can be either valid or invalid, but does not throw directly T1 t1; // heavy object, do not construct if t0 is invalid, by throwing before C(int n) : t0(n), // throw exception if t0(n) is not valid t1() {} }; I t...
could someone also tell me if the actions i am attempting to do which are stated in the comments are correct or not. i am new at c++ and i think its correct but i have doubts #include<iostream> #include<fstream> #include<cstdlib> #include<iomanip> using namespace std; int main() { ifstream in_stream; // reads itemlist.txt ofstream out...
I'm messing around with template specialization and I ran into a problem with trying to specialize the constructor based on what policy is used. Here is the code I am trying to get to work. #include <cstdlib> #include <ctime> class DiePolicies { public: class RollOnConstruction { }; class CallMethod { }; }; #include <boost/static_as...
I would like to make a program to capture video. What is the best way to capture video? I know C++ and I'm learning assembly. I found in my assembly book that I can get data from the video card. Would that be the best way? I know FRAPS hooks into programs, but I would like my program to take video of the entire screen. I would like s...
void execute(int &x,int y=100) { x=x+y; cout<<x<<endl; } void main() { int a=5,b=6; execute(b); } will the following program work in spite of not assigning a default value to the x(formal parameters in the fuction prototype). ...
Hey guys, I'm writing a search algorithm in C++, and one of the things I need to do is have a few if statements that check cells above, below, left of, and right of. Each time a cell is found to be open and added to the stack, I want it added to a list of cells already checked. I want to be able to say in the if statement if(thisCell ...
Can anyone find an example of a simple server/client thing? I'm willing to use any C++ library or even Winsocks it self. I've Googled around but want some opinion on a good article for beginners/sites. ...