View Single Post
Old 06-11-2005, 05:09 AM   #1 (permalink)
ands122
Registered User
 
Join Date: Jun 2005
Posts: 1
ands122 is on a distinguished road
C++ game script HELP!!!

I have no experience with C++. this is my first program i've written. or at least tried to. I keep on getting this error.

Cannot specify -o with -c or -S and multiple compilations.



this is my code:


Code:
#include <stdio.h>
 #include <iostream.h>
 #include <string.h>
 int main(int nNumberofArgs, char* pszArgs[])
 {
      //go to the market
      string smarket="go to the market";
      //explore
      string sexplore="explore";
      string schoice= ""
          cout << "You wake up from a sleep that you\n"
               << "can't remember... That's odd...\n"
               << "You find yourself next to a city.\n"
               << "You also see some money next to you.\n"
               << "Do you want to go to the market,\n"
               << "or explore? (type in either  explore  or  go to market  in exact words.)\n";
           cin >> schoice1;

                   switch(schoice1)
                   {
                           case smarket:
                     cout  << "You walk into the market\n";
                           break;
                           case sexplore:
                     cout  << "You explore. But of course,\n"
                     cout  << "as you should've expected,\n"
                     cout  << "you die. You don't know how,\n"
                     cout  << "you just do.";
                           break;
                           default:
                     cout << "You didn't enter a valid command. Idiot.";
                    }
       return 0;
 }

by the way. I have C++ for dummies and i didn't even get half way through the book. I just want to make a simple game before I do. I don't know anything about the #include things or the return thing at the end. I was just wondering if anyone could help me.
ands122 is offline   Reply With Quote