Can't figure out what the fail is

okay so i'm making a small version on blackjack and i have the program done but when i go to build it this message comes up.

1
2
3
4
5
1
1>Compiling...
1>cl : Command line error D8016 : '/MT' and '/clr' command-line options are incompatible
1>Build log was saved at "file://h:\Visual Studio 2005\Projects\Exercises\ch4_33(21).cpp\ch4_33(21).cpp\Debug\BuildLog.htm"
1>ch4_33(21).cpp - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



and i can't seam to figure out why it is doing that. the proagame is below:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/* this is a simple black jack program. that will ask the user the number of card they 
want and have the dealer deal only 3 cards to themself. The creater of this program
does not belivie in gambling whatsoever

do{ have the card number be randomised
	ask usered how many cards they want

	if user enters x number of cards
		output the number of cards to user

	output the 3 cards to dealer
	add up the total of the user
	add up the total  of the dealer

	if
		user total is equal to dealer total then
		output it was a draw
		draw ++

	else if
		users total is greater than dealers total and less than 21 then
		output the user won
		user ++

	else if 
		users total is less than dealers total then
		output the dealer won
		dealer ++

	else if
		users total is equal 21 then
		output that the user won
		user ++

	else 
		output the dealer won
		dealer ++
	
	do you want to play again(Y/N)?
	}while play is not equal to n or N

	Computer Won: dealer
	You Won: user
	Draws: draw

	17/11/10 By: Lelanie Browne */

#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;

int main()
{
	int user = 0, dealer = 0, draw = 0;
	char play;
	int totalU, totalD;
	int cards;

	do {
		// here we are going to random the carrd numbers from 1 - 10
		srand(time(0));
		int c1 = 1+(rand()%10);
		int c2 = 1+(rand()%10);
		int c3 = 1+(rand()%10);
		int d1 = 1+(rand()%10);
		int d2 = 1+(rand()%10);
		int d3 = 1+(rand()%10); 

		cout << "How many cards would you like: ";
		cin >> cards;
// here the cards numbers are output baseed on how many cards the person wanted
		if (cards == 1) {
			cout << c1 << endl;
			totalU = c1; } 
		// the total is added up
		else if (cards == 2) {
			cout << c1 << c2 << endl;
			totalU = c1+c2;}

		else {
			cout << c1 << c2 << c3 << endl;
			totalU = c1+c2+c3 }

		// here the dealers is given there 3 cards
		cout << d1 << d2 << d3 << endl;

		// the total of the dealer numbers are added  here
		totalD = d1+d2+d3;
// the results of the games is deciced who win in this part
		if (totalU == totalD){
			cout << "I have " << totalD << ". You have " << totalU << ". So we draw.\n";
			draw++; 
			system("pause");
			system("cls");}

		else if ((totalU > totalD)&&(total < 21)) {
			cout << "I have " << totalD << ". You have " << totalU << ". So you win.\n";
			user++; 
			system("pause");
			system("cls");}

		else if (totalU < totalD) {
			cout << "I have " << totalD << ". You have " << totalU << ". So I win.\n";
			dealer++;
			system("pause");
			system("cls"); }

		else if (totalU == 21) {
			cout << "You have " << totalU ". So you win.\n";
			user++;
			system("pause");
			system("cls");}

		else {
			cout << "I have " << totalD << ". You have " << totalU << ". So I win.\n";
			dealer++;
			system("pause");
			system("cls");}

		cout << "Would you like to play again?(Y/N): ";
		cin >> play;
	}while((play != 'n')||(play!='N'));

	cout << "Computer win(s) = " << dealer << endl;
	cout << "You win(s) = " << user << endl;
	cout << "Draw(s) = " << draw << endl;
	return 0;
}


Please help me if you know what i have to change in the program to make is build right and thank you for you help
The error message suggests you what to do: disable /MT or /clr compiler's command line option (probably /clr because it enables common language runtime )
Last edited on
but i don't know to do that
Look at your IDE's help to figure out how to change command line options or where to change things.
k i will do that and thank you
Topic archived. No new replies allowed.