visual-studio-2008

Regarding structure padding in c++

陌路散爱 提交于 2020-12-26 04:41:41
问题 I use a datastructure in my project and in the context of a paricular structure i have a doubt about strucure padding. First Look at the strucure given below. I use Visual Studio 2008 compiler. typedef struct tagDATA_PACK { DWORD dDataLength; BYTE bFlags; BYTE bAttrib; BYTE bOffset; }DATA_PACK; Question1: How much is the size of the above structure? it shows 8 bytes. it is correct. But, consider the modified structure given below? typedef struct tagDATA_PACK { DWORD dDataLength; BYTE bFlags;

change solution file to a different folder

本小妞迷上赌 提交于 2020-07-31 16:00:28
问题 How do I change the folder of my existing solution file (sln)? It's right now inside one of my project's folder; if I cut the solution file and paste it in the root folder,it doesn't load any of my projects. 回答1: The solution file is just a text file. You should be able to move it and then edit it to make sure that any relative paths referenced in the file are correct. I've also been able to right-click on the solution file in the solution explorer and then use save-as to save it in a

Is there a way to disable certain errors under VS2008?

吃可爱长大的小学妹 提交于 2020-06-29 07:39:05
问题 I'm trying to compile a lot of legacy C (C99) code using VS2008. To solve some issue with the C99 code not support by the VS2008 compiler, I switched to the C++ compiler, but I'm now facing another issue with the C++ casting error: error C2440: '=' : cannot convert from 'void *' to 'uint8_t *' Conversion from 'void*' to pointer to non-'void' requires an explicit cast Is there a setting on the C++ compiler to disable that error and allow C-style cast when build in C++ ? 回答1: There's no way to