Hi
How can i resolve this error:
Error 1 error LNK2019: unresolved external symbol SHInitExtraControls referenced in function "public: virtual int __cdecl CTestApp::InitInstance(void)" (?InitInstance@CTestApp@@UAAHXZ) Test.obj
thanks
...
I have a big code that uses only standard C++ libs and compiles well in gcc. As the code was actually written in VS C++ 6.0. The code runs fine in visual studio but when I use gcc compiler it gives no errors on compilation and when I run it it gives this error
"terminate called after throwing an exception at instance std::bad_alloc what...
QWizard have some options related to the buttons as follows:
NoDefaultButton
NoBackButtonOnStartPage
NoBackButtonOnLastPage
DisabledBackButtonOnLastPage
HaveNextButtonOnLastPage
HaveFinishButtonOnEarlyPages
NoCancelButton
CancelButtonOnLeft
HaveHelpButton
HelpButtonOnRight
Now these options are ...
I have a C++ compiled static library of about 15 classes and their member functions and stuff, and compiled, it's almost 14 megabytes. It links to Google's dense hash table library and MPIR, which is like GMP for Windows, but I did that in a plain exe and it was a few kilobytes. Why is it so massive? What can I do to reduce its size? It ...
My confuse is like this code:
#include "stdafx.h"
#include <boost/bind.hpp>
using namespace std;
void fool(std::string s)
{
std::cout<<s<<endl;
}
void fool2()
{
std::cout<<"test2 called\n"<<endl;
}
void fool3(std::string s1,std::string s2)
{
std::cout<<"test3 called\n"<<endl;
}
typedef boost::function<void(std::string)> myHandl...
How do I properly implement a "minimize to tray" function in Qt?
I tried the following code inside QMainWindow::changeEvent(QEvent *e), but the window simply minimizes to the taskbar and the client area appears blank white when restored.
if (Preferences::instance().minimizeToTray())
{
e->ignore();
this->setVisible(false);
}
A...
hello pals, i like to build an application using linux c and c++. i know c and c++ and experienced it in turbo c++ v3. but i need to learn and know about gcc or g++ dev in linux.
i have done a dbms application using c++ using turbo c for ms dos system. now, i need to develop it across linux with good gui's and functionalities like netwo...
On my platform this prints 9223372036854775808.
double x = 1e19;
std::cout << static_cast<unsigned __int64>(x) << '\n';
I tried Boost.NumericConversion, but got the same result.
Splitting x into 2 equal part, then adding together converted halves give the correct result. But I need a generic solution to use in a template code.
Thank...
Is there a more concise way to write the following C++ statements:
int max = 0;
int u = up();
if(u > max)
{
max = u;
}
int d = down();
if(d > max)
{
max = d;
}
int r = right();
max = r > max ? r : max;
Specifically is there a way to embed the assignment of the functions return inside the if statement/ternary operator?
...
Greetings!
When I try to use GetThreadContext() on a thread that I've started with CreateProcess(), I receive an error of 998: ERROR_NOACCESS
You can find a contrived but functional code example of this problem here: http://pastebin.com/tamDhYza
Based on the MSDN article regarding "Thread Security and Access Rights", my assumption is...
Hello,
I have the following code. I have a method called SendBookDiffs(MTBookDiff *bookdiffs, UINT bookdiffs_total) which I would like to use. The description for this method is "This method accepts array of MTBookDiff structures, counting 'bookdiffs_total' elements."
So what I have tried is the following:
MTBookDiff *bookdiffs;
MTBoo...
I'm writing a math library, the core of it is in C++. Later it may be implemented in pure C (C99 I suppose). I think I need a C like API so that I can get Python and matlab and the like to use the library. My impression is that doing this with C++ is painful.
So is there a good or standard or proper way to cast between double complex *s...
I hope this question is not too silly, but what is the most basic class in standard C++?
object? Object?
class MyObject : public object{ ...
and I get "Expected class-name before token{"
Is there any map, diagram or image that shows standard c++ classes inheritance?
Something like this but for C++ ?
...
I have small but frequently used function objects. Each thread gets its own copy. Everything is allocated statically. Copies don't share any global or static data. Do I need to protect this objects from false sharing?
Thank you.
EDIT: Here is a toy program which uses Boost.Threads. Can false sharing occur for the field data?
#include <...
I would like to put use a string* as a key in an unordered_list. I do not want the hash the pointer itself but the string it points to.
I understand I need to create a struct like this:
struct myhash{
size_t operator()(const string * str){
return hash(*str);
}
}
and send it as a a hasher to the map template, but i am ...
Hi,
does somebody have instructions, how do to make a RTSP client with Qt? I have already heard of live555, but I don't know how to link it with Qt.
Is there another way?
I would like to do it with Qt, so that it also runs under Linux and other platformens.
...
We develop a product for internal customers. We don't have a QA team, and don't use assertions. Performance is important, application size isn't.
Is it a good idea to have a single configuration (instead of separating Debug and Release), which will have the debug information (pdbs), and will also do the performance optimization?
Are th...
I need an array of this struct allocated in one solid chunk of memory. The length of "char *extension" and "char *type" are not known at compile time.
struct MIMETYPE
{
char *extension;
char *type;
};
If I used the "new" operator to initialize each element by itself, the memory may be scattered. This is how I tried to allocate a sin...
In my program there is one thread (receiving thread) that is responsible for receiving requests from a TCP socket and there are many threads (worker threads) that are responsible for processing the received requests. Once a request is processed I need to send an answer over TCP.
And here is a question. I would like to send TCP data in ...
How to using gdi+ to write Exif info into a exist image file in C++ windows?
I get a part of code in the following way, however I think most of the following code is not necessary:
BOOL bRet = FALSE;
CString cstrFormat = TransferImageFormatToString(eFormat);
if ( !cstrFormat.IsEmpty() )
{
CLSID clsid;
int fd = _open(CSTRI...