VC6.0经常没反应,该如何解决
VC6.0经常没反应
#include <iostream>
using namespace std;
//入门时钟的程序
class clock
{
private:
int M,S,H;
public:
void settime(int Nh=0,int Nm=0,int Ns=0)
{
M=Nm;
H=Nh;
S=Ns;
}
void showtime()
{
cout < <H < < ": " < <M < < ": " < <S;
}
};
void main()
{
clock mC;
mC.settime();
mC.showtime();
cout < <endl;
mC.settime(3,1,6);
mC.showtime();
}
==========
像上面的程序没有错误,有时vc6.0也会在compile时也会反白,stop compile也没反应,有时compile可以,又linking.........
一直这样没反应.
这是什么一回事啊
------解决方案--------------------
删除了:
到这里:
http://www.idown.com.cn/soft/270.htm#down_url
下载一个英文版本安装就好了.安好后立即打sp6补丁(下载包中已包含).
------解决方案--------------------
重装,ls的地址收藏了
------解决方案--------------------
template <typename T>
T** alloc_binary_array(const int row,const int col)
{
T * p=new T[row*col]; //000310d0
T** pp=(T**)malloc(sizeof(T*)*row);//一个指向指针的指针不用调用构造函数.
for(int i=0;i <row;++i)
{
pp[i]=p + i*col;//偏移i个整行.每行col个元素
}
return pp;
}
template <typename T>
void delete_binary_array(T** pp)
{
T* p= *pp;
free(pp);
delete[] p;
}
#define ARRTYPE int
void main()
{
int i=3,j=15;
ARRTYPE **binary_arrar=alloc_binary_array <ARRTYPE> (i,j);
ARRTYPE k=0;
for(int row=0;row <i;++row)
{
for(int col=0;col <j;++col)
{
k+=1.12;
binary_arrar[row][col]=k;
}
}
ARRTYPE *p= *binary_arrar;
for(int d=0;d <i*j;++d)
{
cout < <p[d] < < " ";
}
delete_binary_array(binary_arrar);
cout < <endl;
}
------解决方案--------------------
把工程 clean 一下,
然后重新 rebuild all
------解决方案--------------------
啊,VC好像跟金山词霸 安装后 6.0是存在这种现象的。并不是你程序本身的问题。
偶也遇到过哦。。。。
听说要打补丁,不过我没打过补丁,死了就杀掉,重新来过,嘿嘿。。。
------解决方案--------------------
同意上面的说法~
可能是你安装的版本问题~~~
重新装一下应该没有这种问题了~~~
------解决方案--------------------
VC跟金山词霸貌似是有点问题。
最好重装一下VC6
#include <iostream>
using namespace std;
//入门时钟的程序
class clock
{
private:
int M,S,H;
public:
void settime(int Nh=0,int Nm=0,int Ns=0)
{
M=Nm;
H=Nh;
S=Ns;
}
void showtime()
{
cout < <H < < ": " < <M < < ": " < <S;
}
};
void main()
{
clock mC;
mC.settime();
mC.showtime();
cout < <endl;
mC.settime(3,1,6);
mC.showtime();
}
==========
像上面的程序没有错误,有时vc6.0也会在compile时也会反白,stop compile也没反应,有时compile可以,又linking.........
一直这样没反应.
这是什么一回事啊
------解决方案--------------------
删除了:
到这里:
http://www.idown.com.cn/soft/270.htm#down_url
下载一个英文版本安装就好了.安好后立即打sp6补丁(下载包中已包含).
------解决方案--------------------
重装,ls的地址收藏了
------解决方案--------------------
template <typename T>
T** alloc_binary_array(const int row,const int col)
{
T * p=new T[row*col]; //000310d0
T** pp=(T**)malloc(sizeof(T*)*row);//一个指向指针的指针不用调用构造函数.
for(int i=0;i <row;++i)
{
pp[i]=p + i*col;//偏移i个整行.每行col个元素
}
return pp;
}
template <typename T>
void delete_binary_array(T** pp)
{
T* p= *pp;
free(pp);
delete[] p;
}
#define ARRTYPE int
void main()
{
int i=3,j=15;
ARRTYPE **binary_arrar=alloc_binary_array <ARRTYPE> (i,j);
ARRTYPE k=0;
for(int row=0;row <i;++row)
{
for(int col=0;col <j;++col)
{
k+=1.12;
binary_arrar[row][col]=k;
}
}
ARRTYPE *p= *binary_arrar;
for(int d=0;d <i*j;++d)
{
cout < <p[d] < < " ";
}
delete_binary_array(binary_arrar);
cout < <endl;
}
------解决方案--------------------
把工程 clean 一下,
然后重新 rebuild all
------解决方案--------------------
啊,VC好像跟金山词霸 安装后 6.0是存在这种现象的。并不是你程序本身的问题。
偶也遇到过哦。。。。
听说要打补丁,不过我没打过补丁,死了就杀掉,重新来过,嘿嘿。。。
------解决方案--------------------
同意上面的说法~
可能是你安装的版本问题~~~
重新装一下应该没有这种问题了~~~
------解决方案--------------------
VC跟金山词霸貌似是有点问题。
最好重装一下VC6