What does “#pragma comment” mean??
What does #pragma comment mean in the following? #pragma comment(lib, "kernel32") #pragma comment(lib, "user32") ...
What is the difference among ios::app, out, and trunc in c++??
I know that the default file open mode is out. And I think out will overwrite the data in the file, but in the follo...
g++ undefined reference to typeinfo?
I just ran across the following error (and found the solution online, but it's not present in Stack Overflow): (...
RobotC - Programming an Elevator?
I'm designing and programming an elevator-like robot for a high school project. Could I possibly do anything to make...
error: ISO C++ forbids in-class initialization of non-const static member?
this is the header file: employee.h #ifndef EMPLOYEE_H #define EMPLOYEE_H #include <iostream> #include <s...
How to cast the size_t to double or int C++?
My question is that I have a size_t data, but now I want to convert it to double or int. If I do something like ...
Expression must have pointer-to-class-type?
I have a struct "MachineState" and i created a list of type "MachineState*". When i Try to iterate through the list ...
How to fix .pch file missing on build??
When I build my c++ solution in Visual Studio it complains that the xxxxx.pch file is missing. Is there a setting I ...
Static function declared but not defined in C++?
I'm getting an error from the following code using C++. Main.cpp #include "file.h" int main() { int k = GetInt...
invalid new-expression of abstract class type?
I am currently writing a raytracer for a university class. In order to load Scenes from files I wrote an sdfloader t...
C++ Loop through Map?
I want to iterate through each element in the map<string, int> without knowing any of its string-int values or...
What does “-Wall” in “g++ -Wall test.cpp -o test” do??
-o changes the output filename (I found that using --help) But I can't find out what -Wall does? ...
How to change string into QString??
What is the most basic way to do it? ...
How to return NULL object in C++?
I know that this might be a duplicate of: Return a "NULL" object if search result not found BUT, there's something ...
Function stoi not declared?
I'm trying to use stoi to convert a string to an integer, however it says it's not declared. I have the standard lib...