After compiling my C++ file I ended up with: fatal error C1004: unexpected end-of-file found
So I went true the code from the top to the bottom about six
times to see if I could find a forgotten { or ) and so on, but it looks alright
to me. In the main() function I placed a couple of breakpoints where input is expected but the compiler ingores if there aren't any.
15 22074 Banfa 9,065
Recognized Expert Moderator Expert
Breakpoints are only any use if you have got to the point of running the program in a debugger. If you have a compiler error you have no program so you would be able to run it in a debugger. You need to fix the compile error.
We could probably help but you didn't post the code we have about as much chance of telling you what your error is without the code as you have of guess what colour mug I am drinking tea from.
donbock 2,426
Recognized Expert Top Contributor
If you can't find anything wrong with the syntax of your source file then go to the last line of the source file and add a newline. A missing newline at the end of the file is pretty much invisible to you.
Thank you for you reply. There is not much point going to Microsoft as they come up with answers whitch never got anything to do with the question you ask.
Thank you for your quick reply. I've been trying to post the code but it is a very big file I can't get it back in an organized way in the small text box. I gave up maybe an idea for the moderator to change this small thing for something bigger. Anyway that is noy the isue. I deleted al the empty lines from the bottom and left one blank. I noticed that when I clicked on the error in the out-screen it jumped strait to the second line on the top, whitch is blank. Could it be that there is something wrong with one of the header files?
Thanks for your help so far,
Marcel
donbock 2,426
Recognized Expert Top Contributor
Actually, the MSDN link provided by alexis4 says that a missing newline at the end of the source file can trigger a c1004 error.
Did you make the error go away?
donbock 2,426
Recognized Expert Top Contributor
Regarding a possible header file problem ... the MSDN link informs us that another cause of the C1004 error is a #if without a matching #endif. Check the indicated header file for unbalanced conditional-compilation directives ... or unbalanced braces, parentheses, etc.
Banfa 9,065
Recognized Expert Moderator Expert
If you can post the whole code post the few lines round the error line.
post your code between [code ... [code] tags copy and past it from your editor it will appear like this
If you need the edit box to be bigger use the up and down arrows on the right hand side of the edit box toolbar. If you go advanced you can use the # button to put code tags into your post by highlighting the code you want enclosed and pressing the button.
And finally the Microsoft website actually has a lot of useful information and the error descriptions are on the whole completely relevant and pedantically acurate. Do not blame that (or any other) website for your lack of experience in debugging code.
HI MK
You try to check whether curly bracket({}) or whatever it is combination is okay. From My exp in vc if they are not okay you may get error like this.
regards,
JOHNY
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Tim Tyler |
last post by:
I'm getting fatal errors when executing code - and my error handler is
failing to trap them - so I get no stack backtrace :-(
The error I am getting is:
"Fatal error: Call to a member function fetchRow() on a non-object."
What are the available options here?
Am I supposed to check I have a real object whenever I perform
|
by: Janwillem Borleffs |
last post by:
Q: I'm getting an unexpected $ or $end parse/syntax error, what's causing
this?
A: This is caused when an expression is started with an opening brace, but
the closing brace is omitted.
Examples:
if ($condition) {
....
// No closing brace; the error is thrown
|
by: Ehartwig |
last post by:
I recently created a script for user verification, solved my emailing
issues, and then re-created the script in order to work well with the
new PHP 5 that I installed on my server. After submitting user
information into my creation script, I get the following error from the
page that is suppose to insert the user data into the database, create
a code, then send an email out for verification.
Parse error: parse error, unexpected $end in...
|
by: MLH |
last post by:
"The following unexpected error occurred in Sub CopyMySQLbttn_Click,
line #250, CBF on frmVehicleChooserform. 2465: "Can't find the field
'forms' referred to in your expression. You may have misspelled the
field name, or the field may have been renamed or deleted."
The above error is returned when running the following click code.
I don't understand what the error means.
Private Sub CopyMySQLbttn_Click()
On Error GoTo...
|
by: Andrew Hunot |
last post by:
I have VB code in VS2003 which creates a HttpWebRequest and performs a POST
operation to a remote URL (an https site), which runs fine and receives a
valid response.
However exactly the same code in VS2005 (to the same site with the same
data) causes an exception 'The underlying connection was closed: An
unexpected error occurred on a send.'
Any ideas as to why and what I can do to get around this?
| |
by: Dhieraj |
last post by:
While compiling a C++ code I am getting the following error :
CC -c -I/opt/iona/artix/2.0/include -I/opt/iona/asp/6.0/include -I/opt/ar/api63/include -I//var/tmp/vidya/aotscommon/include -I//var/tmp/coe/coesup2.0b17/include -I/opt/oracle/product/9.2.0.5.0/rdbms/demo -I/opt/oracle/product/9.2.0.5.0/rdbms/public -I/opt/oracle/product/9.2.0.5.0/plsql/public -I/opt/oracle/product/9.2.0.5.0/network/public ...
|
by: Z.K. |
last post by:
I just create a simple C++.NET Forms project with a simple form and nothing
on it. When it compiles, I get this error:
fatal error LNK1256: ALINK operation failed
(8013144E) : Unexpected exception processing
attribute -- system.ArgumentException : Invalid
directory on URL...
Any ideas on how to fix this so my project will compile?
|
by: basswhizz |
last post by:
Hi guys im having trouble with somethings else now can you help out thanks!!
Im getting this error message
Parse error: syntax error, unexpected $end
Here's my code cheers!!]
<?php
// Connects to your Database
mysql_connect("aldridge3", "root", "") or die(mysql_error());
mysql_select_db("dwalk96") or die(mysql_error());
|
by: ajd335 |
last post by:
Hi all...
I am getting an error Parse error: syntax error, unexpected $end in http:/..... on line 117...(117 is the EOF)..
can you plz help me out..I have checked out for the < , > ,{ ,} etc....
I donno where m wrong....
<?php
class S_Shipping {
// Private variables.
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |