I use apple's x code, my system is OS X 10.4.11
Im getting a warning you must be familiar:

"#ifdef __DEPRECATED
#warning This file includes at least one deprecated or antiquated header. \
Please consider using one of the 32 headers found in section of the \
C++ standard. Examples include substituting the <X> header for the <X.h> \
header for C++ includes, or <iostream> instead of the deprecated header \
<iostream.h>. To disable this warning use -Wno-deprecated.

I followed the advice and zapped the ".h" and I got 10 or more errors!
I put back the deprecated <iostream.h> and got only the warning.



Can we see the total program that you are trying to compile :) Because i cant find any reason to understand what might have gone wrong.

Can we see the total program that you are trying to compile :) Because i cant find any reason to understand what might have gone wrong.

Sure thing, I'm just trying to learn C++ and I'm using a source for a game called "decryptix".
The plot thickens here:

#include <iostream.h>

int main()
    cout << "Decryptix. (c)Copyright 1999 Liberty";
    cout << "Associates, Inc. Version 0.2\n\n" << endl;
    cout << "There are two ways to play Decryptix: either";
    cout << "you can guess a pattern I create,\n";
    cout << "or I can guess your pattern.\n\n";
    cout << "If you are guessing, I will think of a pattern\n";
    cout << "of letters (e.g., abcde).\n\n";
    cout << "On each turn, you guess the pattern and I will\n";
    cout << "tell you how many letters you got right, and how many\n";
    cout << "of the correct letters were in the correct position.\n\n";
    cout << "The goal is to decode the puzzle as quickly as\n";
    cout << "possible. You control how many letters can be\n";
    cout << "used and how many positions (e.g., 5 possible \n";
    cout << "letters in 4 positions) as well as whether or not\n";
    cout << "the pattern might contain duplicate \n";
    cout << "letters (e.g., aabcd).\n\n";
    cout << "If I'm guessing, you think of a pattern and score \n";
    cout << "each of my answers.\n\n" << endl;

    int round = 1;
    int howManyLetters = 0, howManyPositions = 0;
    bool duplicatesAllowed = false;
    bool valid = false;

    const int minLetters = 2;
    const int maxLetters = 10;
    const int minPositions = 3;
    const int maxPositions = 10;

    while ( ! valid )
        while ( howManyLetters < minLetters 
                || howManyLetters > maxLetters )
            cout << "How many letters? (";
            cout << minLetters << "-" << maxLetters << "): ";
            cin >> howManyLetters;
            if ( howManyLetters < minLetters 
                || howManyLetters > maxLetters )
                cout << "please enter a number between "; 
                cout << minLetters << " and " << maxLetters << endl;

        while ( howManyPositions < minPositions 
                || howManyPositions > maxPositions )
            cout << "How many positions? (";
            cout << minPositions << "-" << maxPositions << "): ";
            cin >> howManyPositions;
            if ( howManyPositions < minPositions 
                || howManyPositions > maxPositions )
                cout << "please enter a number between ";
                cout << minPositions <<" and " << maxPositions << endl;

        char choice = ' ';
        while ( choice != 'y' && choice != 'n' )
            cout << "Allow duplicates (y/n)? ";
            cin >> choice;

        duplicatesAllowed = choice == 'y' ? true : false;

        if ( ! duplicatesAllowed 
            && howManyPositions > howManyLetters )
            cout << "I can't put " << howManyLetters;
            cout << " letters in " << howManyPositions;
            cout << " positions without duplicates! Please try again.\n";
            howManyLetters = 0;
            howManyPositions = 0;
            valid = true;

    return 0;

I also can't see why, but I've seen the topic on other forums and all "solutions" didn't work

I'll keep fighting, but if I get lucky some real developer might solve the mystery.

Thank you for you fast reply!


Try using
#include <iostream>
instead of
#include <iostream.h>
iostream.h is a deprecated header, hence you receive the warning.

the standard c++ library exposes only one name std to the global namespace. everything else is put inside the namespace std .

change #include <iostream.h> to

#include <iostream>
using namespace std ;

without the using directive, you need to qualify names with std:: ie. std::cout etc.

I am starting to suspect the catch is my IDE.
I'm gonna try to cop another compiler and see what happens.
I thought I was a crackpot, staying 24 hours on the 'puter.
I now found out that I'm not alone...

It's good to feel like a "normal" nut.

I am surprised with how this forum is a fast reply spot.

Thanks a million, and dont get so happy, I'm ready to bug you guys whenever I get stuck with something.

If anyone ever needs any help with music just scream.
I'm a professional jazz musician. If you want to know my "criminal records" just google me up.
Do a search on "ion muniz" (use the double quotes).

Back to work,


#include <iostream.h>
#incluye <conio.h>
Int main()

It appears there may be some confusion in your operating system version. macOS 10.4.11, known as "Tiger," is a very old version of macOS and is not compatible with modern development tools like Xcode. Xcode typically requires a more recent version of macOS to run.

To resolve this issue and use Xcode, you'll need to:

Upgrade your macOS: Check if your Mac hardware supports a newer version of macOS. You should aim for at least macOS 10.13 (High Sierra) or later for a reasonably up-to-date development environment.

Install a compatible Xcode version: After upgrading your macOS, visit the Mac App Store or the Apple Developer website to download and install a version of Xcode that is compatible with your new macOS version.

Migrate your Xcode projects: If you have existing Xcode projects, you may need to update them to be compatible with the new Xcode version. The Xcode IDE will often assist in this process by offering to perform necessary updates when you open an older project with a newer Xcode version.

Consider hardware compatibility: Keep in mind that older Mac hardware might not support the latest macOS versions. If you're using a very old Mac, you may need to upgrade your hardware to access the latest macOS and Xcode features.

By upgrading both your macOS and Xcode to more recent versions, you should be able to avoid compatibility issues and work with the latest development tools and technologies.

macOS 10.4.11, known as "Tiger," is a very old version of macOS

This question is 15 years old. That's why they were using such an old version at the time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.