This is the message I am getting when I try to compile it.
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1> Add directive to 'stdafx.h' or rebuild precompiled header
1>c:\users\jims ha\documents\vi sual studio 2008\projects\f urniture\furnit ure\furniture.c pp(31) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1>Build log was saved at "file://c:\Users\JimSha \Documents\Visu al Studio 2008\Projects\f urniture\furnit ure\Debug\Build Log.htm"
1>furniture - 1 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
Code:
// Furniture.cpp - This program calculates prices for custom made tables. #include <iostream> #include <string> using namespace std; int main() { double Charge = 0.0; double Length = 50; double Width = 40; double Area = 0.0; string wood type = 'oak'; string wood type = 'mahogany'; string wood type = 'pine'; double leaves = 2; const int charge = 150.00 if area > 750 then charge = 200 if wood type = mahogany then charge 350 if wood type = oak then charge = 250 if leaves = #*50 + charge // Output charge for this table cout << "The charge for this table is $" << charge << endl; return(0); } }
1> Add directive to 'stdafx.h' or rebuild precompiled header
1>c:\users\jims ha\documents\vi sual studio 2008\projects\f urniture\furnit ure\furniture.c pp(31) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1>Build log was saved at "file://c:\Users\JimSha \Documents\Visu al Studio 2008\Projects\f urniture\furnit ure\Debug\Build Log.htm"
1>furniture - 1 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Comment