With C++11, you can add the override keyword after the declaration of each function you re-implement. This will give the compiler a hint that will allow him to scream at you if you try to re-implement a non virtual function.
Last report from me:
It's working if i'll use simplest scan with for loop simply scanning every memory address from the beginning. To find variable address of my test program tooks about 24 seconds, considering that fact that that address was placed at the beginning(11 million position), and CPD with 4Ghc speed.
I calculated, using such "simple" scan might take 2 and half hours...
P.S. And CheatEngine doing such scan like in one second, but it was written on python, i dont know why he choose to write in that language, but must be some reason.
Thanks JonB, It seems that connClose() is the problem. Or more specifically the line 'mydb.removeDatabase(QSqlDatabase::defaultConnection);'. It seems that this only affects the server/client database (as I've tried it with PostresSql with the same results.)
I'm not sure why this doesn't affect Sqlite.
Even when you get this bit working, like I said I suspect your whole approach like now is not going to achieve what you want in the way of making these values available to every module, so you're going to have to do it a different way like I said anyway...
Good evening, I'm sorry for my absence.
It's true! The problem is a C ++ concept that I have been studying for a short time, together with QT. But those who use QT, if I understand correctly, also know C ++. For that I asked the question here. Apart from that, I think it's right that what you said also on the approach. I think that my intent must act in another way. the question is which one?
in your connect statement the first param is an object emitting a signal and the second one is a method (signal) of that object's class. Class QPushButton doesn't have a method (signal) named sayHello. It's a method (signal) in MainWindow class.
QPushButton has a method (signal) named clicked(), so you can connect that. If you want to call pushed() when the button "Hi" is clicked then you connect like this:
If you want the main window to emit sayHello when the button "Hi" is pressed and then in response to that you want to call replyHi you make two connections:
connect(ui->pushButton_2, &QPushButton::clicked, this, &MainWindow::sayHello); // emits sayHello when the button is clicked
connect(this, &MainWindow::sayHello, this, &MainWindow::replyHi); // calls replyHi when sayHello is emitted
Yes, and therein lies the dilemma - the extern "C" turns off the function decoration that template function names require. I'd gone through and used extern "C" on all my classes, and that got me into trouble.
That's because C does not support templates (or classes!). The API wrapped in extern "C" must be C-compatible.
Can I then add USE_NAMESPACE to the definition of an application that links to that library?
Nope. The linker very much cares about namespaces, to answer your title. The namespace identifier will be part of the fully qualified name of the symbol, so you need to link with code compiled with a compatible header.
this has nothing to do with Qt.
std::to_string is C++11, you have to make sure you have a recent enough compiler and to enable C++11 features. If you use Qt Creator you should add CONFIG += c++11 in your .pro file and re-run qmake
Alternatively you can #include <sstream> and use std::stringstream gstream; gstream << 4; std::string g=gstream.str();
Actually, while I'd deleted the action code from mainwindow.cpp, I hadn't deleted its prototype in mainwindow.h. That's what the compiler was complaining about. So I deleted it in the .h and then ran Build -> Clean All. Doing that removed the reference to the deleted action in the moc file. Problem solved. Thanks again for your help.
Thank you for your response. I understand exactly what you're talking about. This is what I needed, I just didn't know how to go about it. I'll get busy with this and see if I can accomplish what you laid out for me. Thanks again. Very much appreciated.
Anyway, the bug is in line 61 in = &inFile; - you assign a variable created on a stack to variable in. In the next line, the inFile goes out of scope and is deleted. So when you try to access in later in the code, it segfaults.
Thanks !! . I know it's not Qt problem but that's why i posted it in C++ section