Click here to Skip to main content
15,670,442 members

Comments by Shao Voon Wong (Top 196 by date)

Shao Voon Wong 18hrs ago View    
Visual Studio 2013 supports C++11. You have to enable it in the project properties dialog.
Shao Voon Wong 28-May-23 5:14am View    
Is the 9-digit 4294967294 (0xFFFFFFFE)? You should post what is the 9-digit you are getting.
Shao Voon Wong 25-May-23 7:24am View    
There is no need to free temp. CT2A allocates memory on the stack, not heap. When the function returns, the stack memory used by CT2A shall be freed.

Here is an example on how to use CT2A: https://stackoverflow.com/questions/859304/convert-cstring-to-const-char
Shao Voon Wong 9-Apr-23 23:27pm View    
Deleted
If you have multiple cpp, you run the g++ first as the compile step and then the linking step. -o switch is to specify the object files, not cpp. -c switch is to specify the multiple cpp files.

https://www.geeksforgeeks.org/compiling-with-g-plus-plus/

g++ -Wall -Werror -std=c++14 -c carboard.cpp board.cpp game.cpp player.cpp

g++ -Wall -Werror -o M123 carboard.o board.cpp game.o player.o
Shao Voon Wong 31-Mar-23 8:07am View    
If the project has UNICODE defined, then SHFILEOPSTRUCT will be SHFILEOPSTRUCTW but shFileOPStruct is the type of SHFILEOPSTRUCTA, the ZeroMemory will cause a buffer overrun.