Firstly, I want to have a clearly overall look at MFC, Win32API .
Is:
Win32API: The first layer between hardware and software in prog [ except assembly ]
MFC : A wrapper by Microsoft ? It helps us in design GUI and a lot of library for easier and faster programming.
My problem is : I want an easy coding in GUI, no need to write every ...
What is the best way to parse or iterate an istream? I need to create a function that takes an istream, parses it and creates an object so was wondering the easiest way to do this. Even something that could convert it to string would be dandy.
...
will I need to load java script objects into QwebKit when my application is loading
I can use setHtml with the html and the java script string formatted but its very hard to
Maintain.
My question is can I embed the html and java script as resource into Qwebkit ?
Also I don’t what that the html and the javascript be available to the appli...
In a derived class I have a function called evaluate() (it's a virtual in the base class). In this derived class i also have a function set_value() and hence i want get_value() as well. get_value() should return the exact same thing as evaluate()
Is there anyway to say that a call to get_value is a call to evaluate()? With some sort of ...
Hi,
I have this array:
array[0] = 18;
array[1] = -10;
array[2] = 2;
array[3] = 4;
array[4] = 6;
array[5] = -12;
array[6] = -8;
array[7] = -6;
array[8] = 4;
array[9] = 13;
how do I sort the array in asc/desc mode in C++?
...
Consider the following in Qt using QtSoap lib:
QtSoapHttpTransport http;
http.setHost("XXXX",3333);
connect(&http, SIGNAL(responseReady()), this, SLOT(getResponse()));
now there is a method i want to call which is:
QtSoapMessage request;
request.setMethod("test");
request.addMethodArgument("xxx","zzzz",xxx);
request.addMethodArgum...
GTK+ 2.x has the follow states: NORMAL, PRELIGHT, ACTIVE, INSENSITIVE, SELECTED for use in GTK themes and I can do things like...
bg[NORMAL] = "#f6f6f6"
.. to change background color when in NORMAL state.
Also, I can change the background image of a button (when the mouse is over it) by changing the PRELIGHT state image.
But I was n...
Say I have
double xSquared( const double )
{
return x*x;
}
...
std::function<double (double)> func = &xSquared;
...
which works fine for the (more complicated) purposes I use this structure, up till now. Now I have a function that accepts a std::function of the above form and I need to create a new std::function that extends the ...
Possible Duplicate:
Why don't operations on double-precision values give expected results?
I am experiencing a peculiar problem in C++. I created a variable of type Double. Then I did some calculations with some values assigned to other variables and assigned the result to the double variable I declared. It gave me a result wi...
Hello all
I have desktop application that using Youtube Player API to stream video to the application but each time
The player loads I have the security warning , is there any way to overcome this ? maybe setup simple web server in my application
This is the last option for me .
...
Hi
I am trying to find the most efficient, optimized and fastest way to compare to std vectors of CString. the strings in question are case-sensitive. I have tried using the == operator for the vector container but this sometimes return false positives. I mean for instance if one vector contains elements in the order (a,b,c) and the oth...
If the following from the C++ FAQ Lite is true: "a function name decays to a pointer to the function" (as an array name decays to a pointer to its first element); why do we have to include the ampersand?
typedef int (Fred::*FredMemFn)(char x, float y);
FredMemFn p = &Fred::f;
And not just:
typedef int (Fred::*FredMemFn)(char x, flo...
My application compiles with VC6 sp6, uses DBGHelp.lib to get stack information. The code is simmilar in debug and release compilations.
The problem is that when executing the debug version, DBGHelp.dll loads msvcrt.dll (the release version). msvcrtd.dll is already loaded by my debug link anyway.
So I end up having both msvcrtd.dll and m...
Possible Duplicate:
Could anyone explain these undefined behaviors (i = i++ + ++i , i = i++, etc)
I am using Visual C++ 6.0 and facing trouble predicting the output of the following program:
int main(int argc,char **argv) {
int a;
int b;
a=1;
b = (++a) + (a++) + (a++);
printf("%d",b);
return 0;
}
...
Hi! I wrote a class to contain my objects in it.
The code is:
class objectPool
{
private:
struct itemType_{uint count; void* object;};
std::multimap< std::string, itemType_ > pool_;
public:
template<class T>
bool addItem(std::string key, T*& object)
{
std::multimap< std::string, itemType_ >::iterator
...
Can I have functors in C? I mean for example in C++ I can do:
struct Rules
{
operator()(/*maybe some args*/)
{
}
};
Some (fictitious) algorithm:
int sort(iter beg, iter end, Rules);
Can I do identically in C?
...
Hello,
I'm trying to use libcurl with a program I'm making, but I'm having some problems with it. So far I've only tried the examples from libcurl's website, but they crash as soon as the program gets to the curl initialization.
My current code:
#include <iostream>
#include <curl/curl.h>
int main(int argc, char *argv[])
{
CURL *c...
I have a big project with a bunch of .cc files that have mostly c code and some c++ code. I want to use a vector in this program since I need an unbounded data type that is simple to make 2d (in other words I don't want to use an array or a list).
The problem is that when I run my make after including the vector class I get errors that I...
The title can be confusing, but I'm wondering is it possible to create program like this one:
class family_tree
{
private:
string name, surname;
family_tree father(); //fragile point!
public:
family_tree();
family_tree(string n, string sur");
void print();
};
What standard is saying about such declaration? What th...
I want to convert val.ElementAt(i) to float value :
float *d = new float[NMAX];
char *buffer = new char[128];
CStringArray val;
//adding some values to val
buffer = (LPSTR)(LPCSTR)val.ElementAt(i).GetBuffer();
d[i] = atof(buffer);
as the result in d[i] I have just part of the value(if it was 55 in d is - 5, 666 - 6 ...), help ...