小编koo*_*eta的帖子

调试断言失败!使用无效的空指针错误

我编译我的代码没有任何错误.但是,当我尝试运行该程序时,会弹出一个包含以下内容的窗口:

Program: C:\Windows\SYSTEM32\MSVCP120D.dll
File: c:\program files (x86)\microsoft visual studio 12.0\vc\include\xstring
Line: 1168
Expression: invalid null pointer
Run Code Online (Sandbox Code Playgroud)

我不确定问题是什么或它可能是什么.我绝对肯定地知道标题非常好,因为它是由教授提供的,我们不会触及它.

意图

代码的目的是从用户获取二进制输入并显示十进制等效值.然后取十进制输入并将其打印为二进制数.

主要

#include "stdafx.h"
#include "LinkedStack.h"
#include <string>
#include <math.h>
#include <iostream>
#include <algorithm>

using namespace std;

int main(){

    string binaryNum = "0";     // Holds the entered binary value
    string decResult = "0";     // Holds the decimal result
    int binResult = 0, pow = 1; // Holds the binary result and the power of 1 for conversion
    int decimal = 0; …
Run Code Online (Sandbox Code Playgroud)

c++ string visual-c++

-4
推荐指数
1
解决办法
1万
查看次数

标签 统计

c++ ×1

string ×1

visual-c++ ×1