السلام عليكم ورحمة الله وبركاته
سؤالي هو
اكيد الكل عارف الـ stack
انا سويت ملف هيدر هذا هو
// Specification file
class StackType {
public:
StackType( );
void MakeEmpty( );
bool IsEmpty( ) const;
bool IsFull( ) const;
void Push( int item );
void Pop( int& item );
void DisplayStack();
private:
int top;
int items[10];
};وفتحت ملف اخر .cpp ووضعت فيه الكود التالي
# include< iostream >
# include"s1"
using namespace std ;
s1 :: s1 ( )
{
top = -1 ;
}
void s1 :: makeempty ( )
{
top = -1
}
bool s1 :: isempty ( ) const
{
return ( top == -1 ) ;
}
bool s1 :: isfull ( ) const
{
return ( top == 9 ) ;
}
void s1 :: pop ( int newitem )
{
top++ ;
item[top] = newitem ;
}
void s1 :: push ( int &ii )
{
ii = item[top] ;
top-- ;
}
void s1 :: display ( )
{
cout << "top -->";
for ( int i = top; i >= 0; i--)
cout << "\t|\t" << items << "\t|" << endl;
cout << "\t|---------------|" << endl;
}وعند تشغيل الملف يظهر لي الخطأ هذا
Error 1 fatal error C1083: Cannot open include file: 's1': No such file or directory c:\users\tech\documents\visual studio 2005\projects\notedatastrcut\s1\wsh\wsh\shxfvb.cpp 2
بصراحة حاولت فيه ما عرفت ما هو الخطأ ؟


