Tag: visual studio 2008

OpenAL:如何创建简单的“麦克风回声”程序?

所以我想知道什么是最短的(在有效线路方面)打开AL代码从默认麦克风读取数据并输出到默认扬声器? 我正在Visual Studio 2008下的Windows 7上进行开发

什么浮点值使sprintf_s()产生“1.#QO”?

我有一些(遗留嵌入式c)代码,它通过一些sprintf调用生成.csv文件。 偶尔我会看到1.#QO值。 我已经尝试重现那些应该给出负无穷大,正无穷大和NaN的条件的值,但它们似乎都没有给我神奇的1.#QO结果。 那产生这个价值的是什么呢? ……是的,我知道在产生这种价值的数学中显然出现了问题,但理解它的含义将有助于调试工作。 [编辑1]进行转换的实际行是: sprintf_s(txt, CSV_HEADER_SIZE, “%.3f”, value); 哪里: #define CSV_HEADER_SIZE (100) char txt[CSV_HEADER_SIZE]; 我正在使用MS Visual Studio 2008进行编译。 [编辑2]更多挖掘显示0xFFFFFFFF给-1.#QO : unsigned int i = 0xFFFFFFFF; float* f = (float*)&i; printf(“%.3f”, *f); // gives -1.#QO ..并在Visual Studio调试器中查看它将其扩展为-1.#QNAN00所以看起来这可能是微软特定的NaN表示?

如何使用gettimeofday()或与Visual Studio C ++ 2008等效的东西?

有人可以帮我在Windows XP上使用Visual Studio C ++ 2008的gettimeofday()函数吗? 这是我在网上找到的代码: #include #include #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 #else #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL #endif struct timezone { int tz_minuteswest; /* minutes W of Greenwich */ int tz_dsttime; /* type of dst correction */ }; int gettimeofday(struct timeval *tv, struct timezone *tz) { FILETIME ft; unsigned __int64 tmpres = […]

如何解决致命错误LNK1000:IncrBuildImage期间的内部错误?

我正在尝试使用Visual Studio 2008在Windows 7 64位上重新编译memcached项目的解决方案文件,并收到以下错误: 1>LINK : fatal error LNK1000: Internal error during IncrBuildImage 1> Version 9.00.21022.08 1> ExceptionCode = C0000005 1> ExceptionFlags = 00000000 1> ExceptionAddress = 001FFCF7 (00180000) “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\link.exe” 1> NumberParameters = 00000002 1> ExceptionInformation[ 0] = 00000000 1> ExceptionInformation[ 1] = 011BD670 1>CONTEXT: 1> Eax = 400DA210 […]

Bubblesort程序与MSVC和TCC的意外输出

我的一个朋友把这个代码发给了我,说它没有按预期工作: #include void main() { int a [10] ={23, 100, 20, 30, 25, 45, 40, 55, 43, 42}; int sizeOfInput = sizeof(a)/sizeof(int); int b, outer, inner, c; printf(“Size is : %d \n”, sizeOfInput); printf(“Values before bubble sort are : \n”); for ( b = 0; b < sizeOfInput; b++) printf(“%d\n”, a[b]); printf(“End of values before […]