it also tells me on the bottom of the window that the build succeeded, but it didnt...
When I open the application it does a "Hello World" then quickly closes. But that is not what I am making... I am making something more complex. I thought surely it would have something...
I saved the project, I know that. Any suggestions?
have you saved the cpp file ? ( it shows an asterix to the name ,so it shows it has been modified) ...
You may try to clean the solution ,and to build it again.
I've once encountered a problem with Visual Studio 2010 that involved the "Enable Minimum Rebuild" option, where code changes weren't compiled until a full rebuild was invoked. This issue only first happened when my project reached around 80 classes. Obviously, a full rebuild of that size wasn't practical. The only way that I found to resolve that particular issue was to switch back to Visual Studio 2008.
Here is the code to the program i copied and pictured (the code is not mine ,and i do not hold any rights over it- it has been put on the net):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// The program is from "Bjarne Stroustrup - Programming Principles and practice using C++"
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
usingnamespace std;
inlinevoid keep_window_open() {char ch; cin>>ch;}
//all these lines are a substitute to "#include "std_lib_facilities.h" "
int main() {
cout <<"Hello,World!\n";
keep_window_open();
return 0;
}
Ok I'll try it, but please look at my other topic somewhere below this one called "C++ Errors". Because a different IDE could compile it, if it weren't for those errors. Thank you, I'll try.
EDIT: I'm gonna post source code here for the errors as well. These might be contributing to the Build 0 error in Visual C++. I am getting the errors from this .cpp file:
// Cross-roads
#include "Library.h"
bool Crossroads()
{
int choice = 0;
while (choice != 10)
{
cout << "You stand at a crossroads. There are several paths going off in many directions.\n\n";
cout << "Behind you is a small market town full of shops \nand bustling with people.\n\n";
// Player chooses his/her location
cout << "Which path do you choose?\n";
cout << "1: Town.\n";
cout << "2: Summoning Portal.\n";
if (!dcomplete)
cout << "3: Desert Road (QUEST)\n";
if (dcomplete && !fcomplete)
cout << "4: Forest Road (QUEST)\n";
if (fcomplete && !scomplete)
cout << "5: Swamp Road (QUEST)\n";
if (scomplete && !gcomplete)
cout << "6: Graveyard Road (QUEST)\n";
if (gcomplete && !ccomplete)
cout << "7: Castle Road (QUEST)";
cout << "10: Exit Game.";
cout << ">";
cin >> choice;
}
returntrue;
}
Errors(about 10-30 of these same errors): "First defined here"({?? The '{' is causing an error??!!)
"Multiple Definition of dcomplete" (/scomplete and other global variables) The global variables are listed in Globals.h which I have put into Library.h along with all header files for this rpg.
As i mentioned before the program is from the book of Mister Bjarne Stroustrup and i do not hold any rights over it. I think you don`t have any problems with the compiler ,maybe its the code itself.Can`t you get the global variables out of Globals.h or at least try #include "Globals.h" ...