ببخشید من اینجا این اشتباه رو کردم.ولی در برنامه اصلی به همان صورتی که گفتید نوشته بودم.با این که هر سه تا در یک فایل قرار دارند باز هم خطای کامپایل میده.با این که در قسمت workspace هم هر سه فایل رو نشان میده.نخندینا ولی اینم errorهاش:
Compiling...
Rect.cpp
e:\microsoft visual studio\vc98\include\string(16) : error C2143: syntax error : missing ';' before ''template<''
e:\microsoft visual studio\vc98\include\string(16) : error C2501: '_STD_BEGIN' : missing storage-class or type specifiers
e:\microsoft visual studio\vc98\include\string(17) : error C2143: syntax error : missing ';' before '<'
e:\microsoft visual studio\vc98\include\string(17) : error C2433: 'basic_string' : 'inline' not permitted on data declarations
e:\microsoft visual studio\vc98\include\string(17) : error C2501: 'basic_string' : missing storage-class or type specifiers
* برای شلوغ نشدن حذف شد *
e:\microsoft visual studio\vc98\include\string(112) : error C2501: 'basic_istream' : missing storage-class or type specifiers
e:\microsoft visual studio\vc98\include\string(112) : error C2059: syntax error : ';'
e:\microsoft visual studio\vc98\include\string(112) : fatal error C1003: error count exceeds 100; stopping compilation
Error executing cl.exe.
Rect.exe - 102 error(s), 0 warning(s)