I've started learning C++ and wrote a "Hello World"-Program. When i try to run it in command prompt, it crashes and gives me a windows message saying "Hello World.exe has stopped working.".
Code:
#include <iostream>
#include <string>
int main()
{
std::string response;
std::cout << "Hallo Welt
";
std::cin >> response;
std::cout << "User: " << response;
return(0);
}
I'm using Eclipse IDE and MinGW as compiler. I've already set the path of MinGW/bin in the environment variables. After i copied all dll's form the MinGW/bin directory into the folder of the Hello World.exe the program worked smoothly. So it seems that whatever it is that needs those dll's cannot access them properly. I'd like to spare me the hassle of copying the dll's for every project i create. Is there any way i could work around that?
I'm not really confident about my computer and programming terminology yet so the description might seem a bit rough - help is still greatly appreciated!
Cheers!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…