expression did not evaluate to a constant- c++

Is a Variable Length Array and is not standard in C++. Some compilers like GCC allow them as an extensions but MSVS will not compile them. In order to get a dynamic array you will need to use a pointer and new Or better yet, rework the function to use a std::string, which handles the … Read more

access violation reading location c++

Two things here: You are not calling “initializeArray()” at all. So when you are trying to access the array there is nothing there. I would recommend calling it in the constructor. Like this: Second, is what the guys above said. You have an incorrect value for the size of your array since you are trying … Read more

C++ Simple hangman game

To compare the strings of word and guess, you can iterate over the characters in a for-loop, and check if there is a match Afterwards, underscore contains the following

C++ Matrix Class

In C, if I wanted to create a matrix struct, I would use: Then I can allocate it with Now do I do the equiv in C++? EDIT: I want to know the cannonical way to implement a matrix class in C++.

When does an Incomplete Type error occur in C++

This happens usually when the compiler has seen a forward declaration but no full definition of this type, while the type is being used somewhere. For example: The second line will cause a compiler error and, depending on the compiler, will report an incomplete type (other compilers give you a different error, but the meaning … Read more

How do you make a HTTP request with C++?

I had the same problem. libcurl is really complete. There is a C++ wrapper curlpp that might interest you as you ask for a C++ library. neon is another interesting C library that also support WebDAV. curlpp seems natural if you use C++. There are many examples provided in the source distribution. To get the … Read more