Here is what my friend and I have so far. of course it doesnt work lol.

[CODE]// guessmynumber.cpp : Defines the entry point for the console application.
//

include "stdafx.h"
include <iostream>
include <string>
include <cstdlib>
include <ctime>

using namespace std;
const int MAX_NUMBER = 10;
char playAgain='y';

class NumberGenerator
{

private:
int theNumber;

public:
//Constructor
NumberGenerator(){
srand(time(0));
newNumber();
}

while (playAgain !='n'){
int getNumber(){
    return(theNumber);  
}
{

//method
void newNumber(){
int originalNumber = theNumber;

    do{
        theNumber = rand() % MAX_NUMBER + 1; // Random Number between 1 and 10
    }while(originalNumber == theNumber);
}

//returns true if guess is correct, return false if guess is not correct
bool isCorrect(int guess){

    if(guess == theNumber){
        return(true);
    }
    else if(guess > theNumber){
        cout << "You Guessed Too High!!" << endl;
    }
    else {
        cout << "You Guessed Too Low!!" << endl;
    }

    return(false);

}

};

class Player
{
private:
    string name;
    int theGuess;

//void means its not going to return
void init(){
theGuess = 0;
}

public:// two constructors to personalise the game
    Player(){
        init();

    }

    Player(string playerName){
        init();
        name = playerName;

    }

    string getName(){
        return (name); 
    }

    int takeYourTurn(){
        do{
            cout << "\n" << name << ", Whats Your Guess: ";
            cin >> theGuess;

            if(theGuess > 0 && theGuess <= MAX_NUMBER){
                break;

            }
            else{
                cout << " ERROR: Your Guess Must Be Between 1 and "
                    << MAX_NUMBER << endl;
            }

        }while(true);

        class Player2
{
private:
    string name;
    int theGuess;

    void init(){
      theGuess = 0;
    }

public:
    Player2(){
        init();

    }

    Player2(string playerName){ ...

[QUOTE=Narue;1616105]Have you tried adding stdafx.h back? Better yet, have you considered turning off that feature entirely so that you can actually use standard C++ without Microsoft-isms?[/QUOTE]

honestly i have no idea what u mean. im opening visual studio 2008 the exact way my teacher showed us. i have another program homework im doing and i get the same errors about the stdafx.h and even if i add that they still dont work. this class is hard, and i think its hard cause my teacher doesn't really explain well...

I have this "guess my number code" that he showed us. its a single player against the computer. and he wants this done to it, with out him explaining to us how the hell to do it..

Two - Player Game (10 bonus points)

Modify the GMN class to change the game into a two-player game with multiple rounds.

Each player takes a turn and the player who guesses correctly is awarded points at the end of the round.

At the conclusion of a round of play, ask the players if they want to play another round. If the answer is YES, then play another round. If the answer is NO, display the player's scores and declare the player with the most points the winner.

i added

include "stdafx.h"

and now it runs correctly! :) thanx!

ty and i see how u merged those together. and now i get this error lol

1>c:\users\h427\desktop\2coutdiamondfinal\2coutdiamondfinal\2coutdiamondfinal.cpp(4) : warning C4627: '#include <cstdlib>': skipped when looking for precompiled header use
1> Add directive to 'stdafx.h' or rebuild precompiled header
1>c:\users\h427\desktop\2coutdiamondfinal\2coutdiamondfinal\2coutdiamondfinal.cpp(5) : warning C4627: '#include <iostream>': skipped when looking for precompiled header use
1> Add directive to 'stdafx.h' or rebuild precompiled header
1>c:\users\h427\desktop\2coutdiamondfinal\2coutdiamondfinal\2coutdiamondfinal.cpp(32) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1>Build log was saved at "file://c:\Users\h427\Desktop\2coutdiamondfinal\2coutdiamondfinal\Debug\BuildLog.htm"
1>2coutdiamondfinal - 1 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I have this working code but my teacher wants really specific things. codes always have to be OOP, and this needs to to have no more then 2 cout. i have 3 but cant seem to find away to take one out. my friend told me i should do this in arrays, but honestly im not really good at this so im really confused about what to do. again sorry if im posting this in the wrong place or posting it in a bad way. thanx u in advance. here is the code,

[CODE]// DiamondLoop.cpp : Defines the entry point for the console application.
//

include "stdafx.h"
include <string>
include<iostream>
using namespace std;

class Diamond
{
private:

public:
    Diamond(){

int i=0, j=0, NUM=3;

for(i=-NUM; i<=NUM; i++)

{

for(j=-NUM; j<=NUM; j++)

{

if( abs(i)+abs(j)<=NUM)

 { cout<<"*"; }

else { cout<<" ";}

}

cout <<endl; 
    }   
}

};
int _tmain(int argc, _TCHAR* argv[])
{

 Diamond shape;

return 0;
}

[/CODE]

i should of added that the other posting does not have the explenation about it being OOP which is the part im having issues with.

Hi i saw a post about this program already. im new to c++ and im lost... completely lost... im not even sure im posting this in the right place. anyways. the program i got is working correctly until i make it an OOP which is what my teacher wants us to do for every program we do. this is what i have so far.

[CODE]// Menu Chooser.cpp : Defines the entry point for the console application.
//

include "stdafx.h"
include <string>
include<iostream>

using namespace std;

class MenuChooser
{
private:

public:
MenuChooser(){

        int main()

{

cout << "Difficulty Levels\n\n";
cout << "1 - Easy\n";
cout << "2 - Normal\n";
cout << "3 - Hard\n\n";

enum level {easy = 1, normal = 2, hard = 3};
int choice;

cout << "Choice: ";

cin >> choice;

switch (choice)
{
case easy:

cout << "You choose Easy." << endl;
break;
case normal:

cout << "You choose Normal." << endl;
break;
case hard:

cout << "You choose Hard!!!" << endl;
break;
default:

cout << "You made an invalid choice!" << endl;

}

cout << "May the gods be with you!";

}

};

int _tmain(int argc, _TCHAR* argv[])

{
Menu Chooser;
return 0;
}

[/CODE]

and i get this error.

1>c:\users\ceabear\desktop\c++\week 3 credit\menu chooser\menu chooser\menu chooser\menu chooser.cpp(64): fatal error C1075: end of file found before the left brace '{' at 'c:\users\ceabear\desktop\c++\week 3 credit\menu chooser\menu chooser\menu chooser\menu chooser.cpp(12)' was matched
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

i have no idea how to ...