首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C++
麻烦各位帮我改一下
#include<iostream>  
#include<string>    
#include<iomanip>
using namespace std; 

int choose;         
int i,n;    
char press;     

struct Student
{
......................
阅读全部 | 最暖的伴 贴于 2013年4月11日 00:34     hide bbsi
Complex operator+ (Complex c1,Complex c2)
{
    Complex temp;
    temp.r= c1.r + c2.r;
    temp.i= c1.i + c2,i;
    return temp;
}
阅读全部 | zhuxiaoneng 贴于 2013年4月10日 12:28     hide bbsi
#include<iostream>
using namespace std;
int main()
{
    char a[5]={'A','B','C','D','E'};
    int i,j,k,m=1,n=2;
    for(i=0;i<3;i++)
    {        
        for(j=0;j<n;j++)
        {
            cout<<" "; 
        }
......................
阅读全部 | wuzhang 贴于 2013年4月9日 21:28     hide bbsi
怎么在C++中使用函数调用输出打印字母?例如
      A
     ABC
    ABCDE
阅读全部 | ZJSZJS 贴于 2013年4月7日 14:54     hide bbsi
#include<iostream>
using namespace std;
int f(int x,int y);
int main()
{   
 cout<<f(2,3);
 system("pause");
 return 0;
}
int f(int x,int y)
{
    if(x==1 && y==1) return 1;
......................
阅读全部 | qunxingw 贴于 2013年4月5日 12:01     hide bbsi
下面是一游戏程序的一段,调试结果是非法定义:如何改正?

char PlaceMade::roomthreeeast(){    int x;     cout << "当你迈进城堡最东边的屋子你注意到\n";     cout << "屋子完全是空的, 没门, 没窗, 甚至 \n";     cout << "没有对问题的任何描述.  程序员走进这间房时\n";     cout << "一定相当累了.\n";     cout << "你想做点什么?\n";     cout << "(1) West: \n";     cout << "(2) 杀死自己: \n";     cin >> x;if (x == 1){     cout << "\n\n\n";     return roomtwoeast();}else if (x == 2){   cout << "有些人呢太自负.  你认为\n";     cout << "事情会如此简单吗?\n\n\n";     system("pause");     return roomthreeeast2();}}
阅读全部 | laizihebei 贴于 2013年4月2日 19:01     hide bbsi
#include<iostream>
#include<cstring>
using namespace std;
void decrypt();//解密函数
void encrypt();//加密函数
void main()
{  
cout<<" ____________________________________________"<<endl;
cout<<"|                                            |"<<endl;
cout<<"|         多表代换密码Playfair的实现         |"<<endl;
cout<<"|              欢迎使用本程序                |"<<endl;
cout<<"|____________________________________________|"<<endl;
......................
阅读全部 | 努力的学习 贴于 2013年4月2日 15:57     hide bbsi
Compiling...
ycsf.cpp
f:\迅雷下载\新建文件夹 (2)\microsoft visual studio\myprojects\sxt\ycsf.cpp(11) : fatal error C1083: Cannot open include file: 'ga.h': No such file or directory
执行 cl.exe 时出错.

sxt.exe - 1 error(s), 0 warning(s)
这是什么原因?初学者,看不懂,请高人帮忙!
阅读全部 | sxt0928 贴于 2013年3月28日 23:03     hide bbsi
#include<iostream>
using namespace std;
int _del(int* a) //處理函數
{int i;
int  flat=1;
for( i=0; i<20; i++)
{
if(a[i]==1 &&  i<8 )   //處理連續的小字
{
if(a[i+1]>0 && a[i+2]>0) 
{ a[i]--; a[i+1]--;  a[i+2]--;}
else {flat=0; break;}
......................
阅读全部 | qunxingw 贴于 2013年3月28日 22:59     hide bbsi
#include<iostream>
using namespace std;
int main(){
int a[10];
void num(int m,int k,int b[]);
int i,j,t;
cin>>i;
cin>>j;
 /*num(i,j,a);*/
 for(t=0;t<=j-1;t++){
 num(i,j,a);
  cout<<a[t];
......................
阅读全部 | L行O影V不E黎 贴于 2013年3月28日 12:54     hide bbsi
上一页 31 32 33 34 35 36 37 38 39 40 下一页