ankakusu
22/10/2007, 09:01
ben çok basit bir kod deniyordum ancak
const int yaratmayı bi türlü beceremedim.
Bir bilgisi olan var mı acaba?
bu c1.h olur
class cl1
{
public:
const int student = 10;
cl1();
virtual ~cl1();
};
bu da c1.cpp. bu kodda hiç bir şey yok
cl1::cl1()
{
}
cl1::~cl1()
{
}
aldığım hata bu ne demek oluyor? hatayı sadece
'const int student = 10'
dediğim için aldım...
--------------------Configuration: prj - Win32 Debug--------------------
Compiling...
cl1.cpp
c:\temp\prj\cl1.h(15) : error C2258: illegal pure syntax, must be '= 0'
c:\temp\prj\cl1.h(15) : error C2252: 'student' : pure specifier can only be specified for functions
Error executing cl.exe.
prj.exe - 2 error(s), 0 warning(s)
const int yaratmayı bi türlü beceremedim.
Bir bilgisi olan var mı acaba?
bu c1.h olur
class cl1
{
public:
const int student = 10;
cl1();
virtual ~cl1();
};
bu da c1.cpp. bu kodda hiç bir şey yok
cl1::cl1()
{
}
cl1::~cl1()
{
}
aldığım hata bu ne demek oluyor? hatayı sadece
'const int student = 10'
dediğim için aldım...
--------------------Configuration: prj - Win32 Debug--------------------
Compiling...
cl1.cpp
c:\temp\prj\cl1.h(15) : error C2258: illegal pure syntax, must be '= 0'
c:\temp\prj\cl1.h(15) : error C2252: 'student' : pure specifier can only be specified for functions
Error executing cl.exe.
prj.exe - 2 error(s), 0 warning(s)