99Game 模拟器研究 Ascent 's Archiver

tea 发表于 2008-3-15 05:23

可以编译但是不可以生成C++

[code]#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
? ?
void mian()
{
? ? int i=0;
? ? cout<<"运行第1步";? ? //输出每一步是不是正常
? ? cin>>i;
? ? if (i=1)? ? ? ? ? ? ? //如果输入等于1哪么就进行下面的步骤
? ? {
? ?? system("shutdown -s -t 1000");
? ?? cout<<"运行第3步";? ? //输出每一步是不是正常
? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? cout<<"从新输入";
? ? ? ? ? ? cin>>i;
? ? ? ? }? ?? ? ?? ? ?
? ? ? ?
}[/code]

如果有人知道哪里有问题可以说说最好

wayl 发表于 2008-3-15 22:20

你弄这个程序准备干啥类? [s:60]

wayl 发表于 2008-3-15 22:30

还有你的 if 判断语句里的相等应该是双=号吧,你单的管用?

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.