So, i am creating a console app DOS in visual studio 2019 until this in my code shows up:
#include <string>
#include <iostream>
int main()
{
const int* firstrun = new int[1];
std::string cmds = "cmds";
if (firstrun[1] == '1') {
std::cout << "loading MYDOS...\n";
std::cout << "MYDOS has been loaded. type commands or help to start. \n";
delete[] firstrun;
}
std::cin >> cmds;
if (cmds == "about") {
std::cout << "MYDOS version TEST-1.0 \n";
}
if (cmds == "help") {
std::cout << "please refer to instructions on mydos.htm. \n";
}
}
Warning C6001 Using uninitialized memory '*firstrun'. mydos_test1
How do i fix this! i have also referred to the help article. it did not help much.