Yoshi Report post Posted August 14, 2005 i need someone with a compiler to compile some games for me(dont worry..no trojans or anything..) because my compiler is just...well..screwed to damnnation and Ann wont freaking wake UP!>#*#%!$#$ Please *puppy dog eyes* ill put your name on the game xD Noko Share this post Link to post Share on other sites
Placid Report post Posted August 14, 2005 Whats wrong with your compiler? Just reinstall? And what system? Share this post Link to post Share on other sites
Yoshi Report post Posted August 14, 2005 i have reinstalled twice, used a different compiler..but no dice. Its my libraries i think, i cant get it to work, it says Iostream and cout are not defined, and i clearly define them in: using namespace std::cout; -.- just making me mad... Share this post Link to post Share on other sites
Learner Report post Posted August 14, 2005 i have reinstalled twice, used a different compiler..but no dice. Its my libraries i think, i cant get it to work, it says Iostream and cout are not defined, and i clearly define them in: using namespace std::cout; -.- just making me mad... 187695[/snapback] Should that be: using namespace std; Share this post Link to post Share on other sites
Yoshi Report post Posted August 14, 2005 well...here i clear things up a bit..ill post the code... its basic, but what do you expect from a beggining programer.. //lost fortune //a personalized adventure #include <iostream> #include <string> using std::cout; using std::cin; using std::endl; using std::string; int main() { const int GOLD_PIECES = 900; int adventurers, killed, survivors; string leader; //get information cout << "Welcome to lost fortune\n\n"; cout << "please enter the following for your personalized adventure\n"; cout << "enter a number: "; cin >> adventurers; cout << "enter a smaller number than the first: "; cin >> killed survivors = adventurers - killed; cout << "enter your last name: "; cin >> leader; //tell the story cout << "\nA brave group of " << adventurers << " set out on a quest "; cout << "- in search of the lost treasure of Ancient dwarves. "; cout << "The group was lead by the Legendary rouge, " << leader << ".\n"; cout << "\nAlong the way, a band of Marauding orges ambushed the party. "; cout << "All fought bravely under the command of " << leader; cout << ", All the orges were defeated, but at a cost. "; cout << "Of the Adventurers, " << killed << " were vanquished, "; cout << "leaving just " << survivors << " in the group.\n"; cout << "\nThe party was about to give up all hope. "; cout << "But while laying the deceased to rest, "; cout << "they stumbled upon the buried fortune. "; cout << "So the adventurers spilt " << GOLD_PIECES << " gold pieces."; cout << leader << " held in to the extra " << (GOLD_PIECES % survivors); cout << " pieces to keep things fair ofcourse.\n"; return 0; } Share this post Link to post Share on other sites
Wytter Report post Posted August 16, 2005 Are you compiling with a C++ compiler? Share this post Link to post Share on other sites
Wytter Report post Posted August 16, 2005 And what error are you getting?... Share this post Link to post Share on other sites
Yoshi Report post Posted August 17, 2005 something about iostream, cout, and vector not being defined.. as i said...its my libraries i think Share this post Link to post Share on other sites
Placid Report post Posted August 17, 2005 Compiled fine for me on Cygwin using g++ Although I had to add a ; at the end of one of the lines Executable && Source file [EDIT] Ummm, I just realised, you'll need cygwin to run that...more than likely... Sorry... Share this post Link to post Share on other sites
freeone3000 Report post Posted August 17, 2005 I have cygwin installed, and it still doesn't work. Missing a .dll. Share this post Link to post Share on other sites
Placid Report post Posted August 18, 2005 I have cygwin installed, and it still doesn't work. Missing a .dll. 188594[/snapback] Yeah its looking for cygwin-XX.dll, which probably isn't in the same location in your installation. Share this post Link to post Share on other sites
darkst Report post Posted August 20, 2005 I cut'n'pasted the code into a new project on my copy of Bloodshed 4.9.9.2. After adding the ';' that Placid mentioned it compiled fine, and also ran fine. I don't have cygwin on this box, and didn't need any special libraries. Note that the code only uses stdin and stdout, so it should work just fine in a Windows console with just the standard libraries. To take this further we will need to know the platform (Windows? and if so which?) and the compiler used. Also the *exact* error message you got. Share this post Link to post Share on other sites
Placid Report post Posted August 24, 2005 I managed to compile it find in Dev C++ The links in my previous post work fine, so download the exe from there. Share this post Link to post Share on other sites