小编Mac*_*zie的帖子

c ++如何将double放入String中

那么在带有字符串的java中你可以这样做:

int stuff;
string otherstuff;

otherstuff = "I like this much stuff: " + stuff;
Run Code Online (Sandbox Code Playgroud)

但在C++中我不知道如何.

c++

1
推荐指数
1
解决办法
282
查看次数

WinAPI窗口立即关闭

我一直在试验WINAPI尝试学习它,但我创建的窗口立即关闭.正如您所看到的那样,当按下W键或按下左键时,它将关闭程序,但在没有按下任何按钮的情况下运行它时它仍会关闭.

#include <windows.h>
#include <windowsx.h>


// the WindowProc function prototype
LRESULT CALLBACK WindowProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

// the entry point for any Windows program
int WINAPI WinMain(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nCmdShow)
{
    // the handle for the window, filled by a function
    HWND hWnd;
    // this struct holds information for the window class
    WNDCLASSEX wc;

    // clear out the window class for use
    ZeroMemory(&wc, sizeof(WNDCLASSEX));

    // fill in the struct with the needed …
Run Code Online (Sandbox Code Playgroud)

c++ winapi

1
推荐指数
1
解决办法
611
查看次数

Visual Studios忽略文件

Visual Studios忽略了我想要播放的文件.使用此代码,它返回false,因为它不加载文件.

    result = LoadWaveFile("../Engine/data/sound01.wav", &m_secondaryBuffer1);
if (!result)
{
    return false;
}
Run Code Online (Sandbox Code Playgroud)

c++ directx winapi directsound

0
推荐指数
1
解决办法
66
查看次数

标签 统计

c++ ×3

winapi ×2

directsound ×1

directx ×1