小编kom*_*ihe的帖子

链接:致命错误LNK1104:无法打开文件'MSVCRTD.lib'

我是C++的初学者.__CODE__当我尝试调试Microsoft Visual C++ 2010 Express中的任何项目时,我收到错误.我在Stackoverflow和Google上搜索了我应该做的事情,但找不到答案.我所理解的文件msvcrtd.lib应该在map\Microsoft Visual Studio 10.0\VC\lib中,但该文件不存在.我该怎么办?

c++ visual-c++

25
推荐指数
7
解决办法
6万
查看次数

printf字符串输出"Dz↕"getch()C++

我希望输出说出用户按下的箭头键.我得到的输出是:

"You pressed the Dz? button."
Run Code Online (Sandbox Code Playgroud)

我写的是:

unsigned int key;
string K;
do
{
    key = getch();
    if (key==72)
        K=" up";
    else if(key==80)
        K="down";
    else if (key==77)
        K="right";
    else if (key==75)
        K="left";
    else
        {}
    if (key!=224)
        printf("You pressed the %s button.\n", K);
    else
        {}
}while(key !='q');

return;
Run Code Online (Sandbox Code Playgroud)

c++ string printf visual-studio-2010 visual-c++

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

Python递归错误,但不使用递归

我没有在我的代码中使用递归,所以我不明白为什么我收到关于递归的错误................................................... .........................................

代码是:

from os import system
from time import sleep
import msvcrt 

player_location = [0, 0]
player_dir = [0, 0]
width = int(raw_input('Width:'))
height = int(raw_input('Height:'))

def get_input():
    if msvcrt.kbhit():
        return msvcrt.getch()
    else:
        return ''

def update_screen():
    global player_location
    system('cls')
    for i in range(0, (height-1)):
        if i == player_location[0]:
            print (' ' * (player_location[1] - 1)) + 'X' + (' '*(width*2 - player_location[1] - 1)) + '|'
        else:
            print (' ' * width * 2) + '|'
    print ('-' …
Run Code Online (Sandbox Code Playgroud)

python recursion msvcrt

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