| | |
fatal error C1189
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Mar 2008
Posts: 1,495
Reputation:
Solved Threads: 123
Code this small can easily be embedded into your post, so in future, do it 
C++ Syntax (Toggle Plain Text)
#define _AFXDLL #include <fstream> #include <string> #include <Cstringt.h> #include <iostream> #include <direct.h> #include <afxv_w32.h> using namespace std; int main() { string line1, line2 ; string end_str ; CFileFind finder; bool finding = finder.FindFile (); bool firstFile=1; bool condition; //------------------------------------------------------------- end_str = "<ENDFILE;" ; condition= 0; while (finding) { finding = finder.FindNextFile(); Cstring title = finder.GetFileName(); ifstream fin (title); if(!fin) { cout<< "cannot open input file \n"; return 1; } ofstream fout ("merge.cf"); if (!fout) { cout<< "cannot open output file .\n"; return 1; } //.............................................................. if(firstFile) { while (!fin.eof()) { getline (fin,line1); getline (fin,line2); if (end_str==line2) condition=1; else condition=0; if(!condition) fout<<line1<<'\n'; else fout<<line1; } firstFile=0; } else { getline (fin,line1); fout<<'\n'; while (!fin.eof()) { getline (fin,line1); fout<<line1<<'\n'; } } fout.close(); } finder.Close (); return 0; }
Last edited by William Hemsworth; Oct 16th, 2008 at 11:58 am.
http://msdn.microsoft.com/en-us/libr...e0(VS.80).aspx
My guess is you remove #define _AFXDLL since you're creating an executable (it has a main) and not a DLL.
But if you click the link, and then look at the real cause of the #error, and tell us that as well, we might get further.
My guess is you remove #define _AFXDLL since you're creating an executable (it has a main) and not a DLL.
But if you click the link, and then look at the real cause of the #error, and tell us that as well, we might get further.
![]() |
Similar Threads
- iostream or iostream.h??? (C++)
- Using ACE in VC++ service project (C++)
- Graphics in C (C)
- errors while executing vc++ code (C++)
Other Threads in the C++ Forum
- Previous Thread: please help me in my project (urgent )
- Next Thread: using _tcscpy_s
Views: 884 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll dynamiccharacterarray encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib lines list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search simple sort sorting spoonfeeding string strings struct temperature template templates text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






