How to find Bug in Qt!!
-
Hi All,
I have compiled my project and have some errors, but I can not find where the code has a problem. I know the errors are from the stl library(vetor, pair, tuple), but I've used a lot of this library in my project and Qt does not show any problems.. Have a solution?
-
Hi,
What version of Qt are you using ?
What compiler is it ?
What's in the offending part of your code ? -
Qt Creator 4.3.1
Qt 5.9.0 MinGW 32 bit
some classes I use stl container. for example
-
https://en.cppreference.com/w/cpp/memory/allocator_traits
According to those docs it is a template for classes not "int". Am I reading that right?
-
Hi
it seems to come from smart_algorithm.cpp line 47 -
Qt Creator 4.3.1
Qt 5.9.0 MinGW 32 bit
some classes I use stl container. for example
@Saeed_Nowroozi Please show your smart_algorithm.cpp from where the error is actually coming.
-
thanks, this is class smart_alg. classes are not finished.
and these are .cpp code.
-
thanks, this is class smart_alg. classes are not finished.
and these are .cpp code.
@Saeed_Nowroozi __smart_alg() has a return value but there is no return.
Also:std::vector<int,int>
?!
-
__counting
also expects a return value. -
Hi
so you write
so std::vector<int,int> which makes it think you give it a custom allocator but
then it gets unhappy as an int is not expected type at all or related to std::allocator.In any case, it does actually tell where the error comes from, so it's important to read it carefully to spot the place
that starts the chain of ugly errors.
-
Think's all
problem is solved.