PDA

View Full Version : مشکل این کد ساده چیه؟



maysamscript
جمعه 09 بهمن 1388, 09:35 صبح
#include<iostream.h>
#include<conio.h>
#include<string.h>
class string1{
public:
int test(){
return 1;
}
}//end class
void main()
{
string1 string1;
clrscr();
cout<<string1.test();
getch();
}

این کد این خطا رو میده:

10: Too many types in declaration

Open-Source
جمعه 09 بهمن 1388, 09:51 صبح
#include<iostream.h>
#include<conio.h>
#include<string.h>
class string1{
public:
int test(){
return 1;
}
};//end class
void main()
{
string1 string1;
clrscr();
cout<<string1.test();
getch();
}

این کد این خطا رو میده:

10: Too many types in declaration

فقط یه ';' میخواست