Possible Duplicate:
Library Recommendation: C++ HTML Parser
Hi all...
Can any provide me a sample link which can parse all the images and .css files assosiated with web page...
i know the logic.. but i m failing in one or the other possibilities...
i am not getting any documentation that how web-browser download the entire webp...
I have a normal QTreeView, a custom QAbstractItemModel and a custom QSortFilterProxyModel.
I've reimplemented QSortFilterProxyModel::filterAcceptsRow to filter items from my model in the way I want, however now I want those filtered items to be expanded in the treeview.
The obvious solution was to emit a signal from QSortFilterProxyMo...
Hi
I have to pass the address of a member fn taking one argument to the std::for_each. how do i do this?
class A{
void load()
{
vector<int> vt(10,20);
std::for_each(vt.begin(), vt.end(), &A::print);
//It didnt work when i tried mem_fun1(&A::print)
}
void print(int a)
{
cout<<a;
}
};
Thanks
...
Strange programming problems as of now..As you can see below i have assigned intFrontPtr to point to the first cell in the array. And intBackPtr to point to the last cell in the array...:
bool quack::popFront( int &popFront )
{
//items[count-1].n = { 9,4,3,2,1,0 };
nPopFront = items[0].n;
if ( count >= maxSize ) return fa...
Hi,
I'm a practicing C++ programmer (on Unix and gcc 3.x) for the past 6-7 years. I've read Scott Meyer's Effective C++, More Effective C++ and Effective STL cover-to-cover and have lived and practiced his suggestions/techniques along with Boost. I would like to move on to the more advanced aspects of C++ - something along the lines of ...
I'm writing a small wrapper around libxml2 in C++, and I'm trying to work out how to handle errors. For now, let's say I just want to print them out. Here's what I've got at present:
My error handling function:
void foo(void *ctx, const char *msg, ...) {
cout << msg << endl;
return;
}
Initialised like this:
xmlGenericErrorFunc h...
Hi,
is there a data structure, which stores its elements uniquely (for a given compare-Functor) but answers queries for the highest element in that data structure with respect to another compare-Function ?
For Example: I have a class with two properties :
1) the size
2) the value
I'd like to have a data structure which stores all elem...
Hello I want to build a project with intel compiler.
With default gcc I usually run:
cmake -DCMAKE_CXX_FLAGS=-I/some/path /path/to/project
And this works fine.
cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_FLAGS=-I/some/path /path/to/project
When I try to use non-default compiler it does not path CMAKE_CXX_...
Hi everyone,
I'v been bored so I created a small console minesweeper game and while writting it I had to find the neighbor positions of an element in a size*size matrix which is represented as an vector of elements and one variable which holds the size value. I didn't want to return the actual values of the neighbor elements but their p...
If I have in C++:
class A {
private: virtual int myfunction(void) {return 1;}
}
class B: public A {
private: virtual int myfunction(void) {return 2;}
}
Then if I remove virtual from the myfunction definition in class B, does that mean that if I had a class C based on class B, that I couldn't override the myfunction since it w...
AccountController can't extend BaseAccount and BaseController at the same time. If I make all BaseAccount or BaseController methods empty, I can have an interface, but if I implement that interface in two different places, that is, I make a contract to implement a method in two different places, I will have duplicated code. Do interfaces...
Hi
i want to know how could we look at the c file after it has been expanded by the preprocessor before compilation with all the macro values put in the code inside the function where ever they are used.
in there a way to do it?
...
I have an audio file and I am iterating through the file and taking 512 samples at each step and then passing them through an FFT.
I have the data out as a block 514 floats long (Using IPP's ippsFFTFwd_RToCCS_32f_I) with real and imaginary components interleaved.
My problem is what do I do with these complex numbers once i have them? ...
Any idea on how to solve such problems (in C++)-
like which is the best Algorithm to use.
...
I'd like some help on using MFC without the document/view architecture.
I created a project without doc/view support, Visual C++ created a CFrameWnd and a view that inherits from CWnd. I replaced the view inheriting from CWnd with a new view that inherits from CFormView.
However, when I run my program, after I close the window I get a ...
Hi,
I want to build similar experience as google desktop search is giving while opening the file. Suppose the user is searching for a particular file and he clicks on it in the browser, google desktop is opening it in foreground, i tried to do this in my app but it some times opens in background.
I used ShellExecuteEx and then AllowSe...
Hi,
I've started to use XCode and it seems to work, well, most of it.
The annoying thing is it compiles all the source files, even those that didn't change, each and every time.
I'm getting the grips with openframeworks and I waste time compiling the openframeworks source files every time although they don't change.
Here are my IDE a...
I'm developing an application with SQLite as the database, and am having a little trouble understanding how to go about using it in multiple threads (none of the other Stack Overflow questions really helped me, unfortunately).
My use case: The database has one table, let's call it "A", which has different groups of rows (based on one of...
In C++, Windows platform, I want to execute a set of function calls as atomic so that execution doesn't switches to other threads in my process. How do I go about doing that? Any ideas, hints?
EDIT: I have a piece of code like:
someObject->Restart();
WaitForSingleObject(handle, INFINITE);
Now the Restart() function does its work asy...
I am trying to debug an issue in my code. I have a process A which runs continuously till I ask it to stop.
Inside A I do the following:
mount partition /dev/sda1
open() // creates an empty file X
write() // write some bytes to it
close() // close the file
processFile() // Perform some operation
remove() // remove file
umount /dev/sda...