473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Compiler giving errors on iosfwd file.

My 1st program in C++....

Unexpected errors come up and all to do with the header.....

Plz help me... :(
Attached Images
File Type: jpg 2004962346498549149_rs.jpg (89.8 KB, 1123 views)
May 30 '07 #1
14 8181
gpraghuram
1,275 Expert 1GB
HI,
Explain the problem more clearly or post the code where u are facing the issue.

Raghuram
May 30 '07 #2
svlsr2000
181 Expert 100+

My 1st program in C++....

Unexpected errors come up and all to do with the header.....

Plz help me... :(
Did u create and empty project and solution before adding your files. what are the other files in ur solution
May 30 '07 #3
That's all I got. A .cpp. That's it. And all the code is just that.

I know C,now I want to do C++ and it's just give random errors when trying to compile. As far as I'm concerned... my code is fine... isn't that right???
May 30 '07 #4
Banfa
9,065 Expert Mod 8TB
In future please take the trouble to copy and paste the code and errors as text into you message rather than pasting a screen shot.

The problem is not in your code it is in the header iosfwd which is presumably included through iostream.

Check your compile options to make sure they are correct, pay particular attention to the precompiled header options.
May 30 '07 #5
sicarie
4,677 Expert Mod 4TB
Hey guys-

I changed the thread title to (hopefully) better describe the issue, let me know if you think it should be different.
May 30 '07 #6
In future please take the trouble to copy and paste the code and errors as text into you message rather than pasting a screen shot.

The problem is not in your code it is in the header iosfwd which is presumably included through iostream.

Check your compile options to make sure they are correct, pay particular attention to the precompiled header options.
Thx, but can you be more specific??? I don't really know where to find the options.....

The code in text

#include <iostream>
using namespace std;
int main()
{
cout<<"Hello"<<endl;
return 0;
}

Here are the error in text...

Error 1 error C2146: syntax error : missing ';' before identifier '_Fpz' c:\program files\microsoft visual studio 8\vc\include\iosfwd 34
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\include\iosfwd 34
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\include\iosfwd 34
Error 4 error C2061: syntax error : identifier 'fpos_t' c:\program files\microsoft visual studio 8\vc\include\iosfwd 50
Error 5 error C2146: syntax error : missing ';' before identifier 'seekpos' c:\program files\microsoft visual studio 8\vc\include\iosfwd 65
Error 6 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\include\iosfwd 65
Error 7 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\include\iosfwd 66
Warning 8 warning C4183: 'seekpos': missing return type; assumed to be a member function returning 'int' c:\program files\microsoft visual studio 8\vc\include\iosfwd 68
Error 9 error C2146: syntax error : missing ';' before identifier '_Fpos' c:\program files\microsoft visual studio 8\vc\include\iosfwd 117
Error 10 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\include\iosfwd 117
Error 11 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\include\iosfwd 117
Error 12 error C2065: 'EOF' : undeclared identifier c:\program files\microsoft visual studio 8\vc\include\iosfwd 510

Thx again...
May 30 '07 #7
svlsr2000
181 Expert 100+
That's all I got. A .cpp. That's it. And all the code is just that.

I know C,now I want to do C++ and it's just give random errors when trying to compile. As far as I'm concerned... my code is fine... isn't that right???
did u create solution and empty project for this code?
May 31 '07 #8
Yes it's an empty project.
May 31 '07 #9
Savage
1,764 Expert 1GB
Yes it's an empty project.
Project->Options->Compiler tab

On the upper right part of the options frame u will see Pre-compiled headers

Savage
May 31 '07 #10
What do I change it to???
May 31 '07 #11
Savage
1,764 Expert 1GB
What do I change it to???
What's currently selected?

Savage
May 31 '07 #12
It's "Non Using Precompiled Headers" There are options..... Create precompiled headers, Use precompiled headers, <inherit from parent or project default>

Which one do I select?
Jun 21 '07 #13
weaknessforcats
9,208 Expert Mod 8TB
There are no bugs in your code.

Did you do this:
1) Create a C++ Win32 Project
2) When rthe wizard appeared you did not click Finish but instead clicked Application Settings
3) then you selected a) console application and b) empty project
4) then you clicked Finish.
5) then you ADDED a .cpp file to the project

If you didn't do this exactly, your project and .cpp file are not set up correctly.

Be sure you didn't confuse C++ with C#.

Normally, you don't get a .cpp file by creating a project. You create a project and then ADD a cpp file to the project.

Your attachment does not show the Solution Explorer so I can't tell if the .cpp file is part of your project.
Jun 21 '07 #14
svlsr2000
181 Expert 100+
Please check this link from msdn. This might help you to create a new project and solution / workspace for your .cpp file

http://msdn2.microsoft.com/en-us/lib...yc(VS.80).aspx
Jun 21 '07 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: dotyet | last post by:
I have been given the daunting task of sql query tuning. I am looking for ways to get started with that. I am on DB2 UDB 8.2 (8.1 with Fixpak 8) on Windows. One point which I could think about...
1
by: rfroli | last post by:
Hi, After installing Windows SP2, I receive an internal compiler on a pch file when trying to compile a C++ project on VS.Net 2003. The pch file was built before the installation of SP2.
3
by: | last post by:
Hi, I have a VC7++ VS2003 program that uses CRecordSet to write one record to a SQLAnywhere database via ODBC, a Code Sniplet is contained below, on most machine running the same OS and Build...
3
by: SalP | last post by:
I'm using VS 2003. I'm uplading a file using Input Type='File' .PostedFile. etc. How does one trap the error when the file is larger than the 4 Meg default? Try/Catch doesn't work. I get the...
1
by: Sanny | last post by:
My website gets a PHP error as below. main(): php_network_getaddresses: getaddrinfo failed: Name or service not known in .... And after an hour or two Everything becomes OK automatically....
17
by: psbasha | last post by:
HI, I have a Samplescript.When I run this Script,it should pop up message saying that whether to run Batch or Interactive I/P: SampleScript.py or SampleScript.pyc >>> SampleScript.py -->...
1
by: kabrizier | last post by:
Hi i am extremely new to this and i have been given a task to upgrade vb6 code to vb.net.Is it necessary to change data connections to the datasets and bindings in .net . Also there are just a lot of...
2
by: Speaker | last post by:
I am receiving a few errors when I try to run my program and I can't figure out what I am doing wrong. I'm coding in C++ with minGW on Vista SP1. Here is my code: #include <iostream> using...
2
by: Saser | last post by:
Hi. I wonder if there is any option to specify the input file path with csc.exe, like -file <file path> or -path <file path>? I've googled it, and I found a topic at MSDN about "C# Compiler...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.