猜数字游戏的小项目 ,有点问题,过不去,求大神指点一二
#include "stdafx.h"
#include<stdlib.h>
#include<conio.h>
#include<time.h>
#include<Windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
int i,n;
while(1)
{
system("cls");
gotoxy(15,6);
printf("1.start game");
gotoxy(15,8);
printf("2.Rule");
gotoxy(15.10);
printf("3.exit\n");
gotoxy(25,15);
printf("please choose :");
scanf_s("%d",&i);
switch(i)
{
case 1:
system("cls");
printf("please input n:\n");
scanf_s("%d",&n);
guess(n);
Sleep(5);
break;
case 2:
system("cls");
printf("\t\tThe Rules Of The Game\n");
printf("step1:input the number of digits\n");
printf("step2:input the number seperated by a space between two numbers\n");
printf("step3:A represent location and data are correct\n");
printf("\tB represent location is correct but data is wrong!\n");
Sleep(8000);
break;
case 3:
exit(0);
default:
break;
}
return 0;
}
++++++++++++++++++++++++++++
1>d:\documents\visual studio 2012\projects\猜数字游戏a1\猜数字游戏a1\猜数字游戏a1.cpp(19): error C3861: “gotoxy”: 找不到标识符
1>d:\documents\visual studio 2012\projects\猜数字游戏a1\猜数字游戏a1\猜数字游戏a1.cpp(21): error C3861: “gotoxy”: 找不到标识符
1>d:\documents\visual studio 2012\projects\猜数字游戏a1\猜数字游戏a1\猜数字游戏a1.cpp(23): error C3861: “gotoxy”: 找不到标识符
1>d:\documents\visual studio 2012\projects\猜数字游戏a1\猜数字游戏a1\猜数字游戏a1.cpp(32): error C3861: “guess”: 找不到标识符
1>d:\documents\visual studio 2012\projects\猜数字游戏a1\猜数字游戏a1\猜数字游戏a1.cpp(59): fatal error C1075: 与左侧的 大括号“{”(位于“d:\documents\visual studio 2012\projects\猜数字游戏a1\猜数字游戏a1\猜数字游戏a1.cpp(12)”)匹配之前遇到文件结束
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
每次都是 gotoxy 没标示符,明明前面有标识符啊,还有guess 也是 ,求指导!!