1

Using CodeLite c++14, mingw-32. I'm fairly new and learning from a course to program in the languge, but i've encounterd a problem in the last couple of days i couldn't figure out. For some reason, the command line prompt shows only the last row of my output code. this happens in all types of code that i've done so far. Something that might be connected is that sometimes on the first building & executing of code (after a clean) i'm getting an error:

mingw32-make.exe: *** [All] Error 2

It's just an inconvinice though, a second build is solving this problem for some reason. But it might be connected some how.

Any way here's an example for a code:

#include <iostream>
using std::cout;
using std::cin;
using std::endl;


int main() {
    char vowels[] {'a','e','i','o','u'};
    cout << "\nThe first vowel is " << vowels[0] << endl;
    cout << "\nThe last vowel is " << vowels[4] << endl;
    return 0;
}

The output that shows is only "The last vowel is u", it goes to basiclly any code i create.

Thanks!

Nix
  • 77
  • 1
  • 10

1 Answers1

1

So I found an answer, and this probably won't help alot of people because its pretty absurd. apperantly i had a mining virus on the computer which also made it so at startup only a CMD window would appear and I had to type 'explorer.exe' manually.

So mingw basiclly tried to tell me something was messing with my CMD every time i opened it. What a way to find out.

A fix for those who face the same (found on reddit @spiralspectra): 1.a) Open Run (windows key + r) and enter "%appdata%" without quotes and press enter.

1.b) Go to the Microsoft folder and delete the SoundMixer folder contained within (This is the mining software).

1.c) Open Run and enter "regedit.exe" without quotes.

1.d) Find the registry entry mentioned as([HKEY_CURRENT_USER\Software\Microsoft\Command Processor]) and remove it. This entry attempts to run the miner whenever a CMD is started.

2.a) Go to the winlogon registry entry in the same regedit software ([HKEY_CURRENT_USER\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon])

2.b) Check the sub-key named "shell" and change its value to "explorer.exe" without the quotes. (This means when you log onto windows it will no longer attempt to run the miner and instead start up normally.)

Nix
  • 77
  • 1
  • 10