473,396 Members | 1,792 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,396 software developers and data experts.

fatal error C1075: end of file found before the left brace '{', how do i fix this?

This is what I've got in my program so far.

/************************************************** *******************************/
#include <iostream> // include standard I/O library
#include <fstream> // include standard F library
#include <cctype> // include standard cc library
#include <string> // include C++ string class
using namespace std; // access standard namespace

int main( )
{
const int SIZE = 51;
string fileName = " ";
char sc1, sc2;
ifstream inFile;
int pv1, pv2;


cout << "Please enter a file name and file type: ";
cin >> fileName;
cout << fileName << endl;

inFile.open (fileName);

//if file unavailable ask user to re enter file name
while (!inFile)
{
inFile.clear();
cout << fileName << " could not be opened, please enter new file name: ";
cin >> fileName ;
cout << fileName << endl;
inFile.open (fileName);
}

cout << " State State Pop Vote Pop Vote Elect Vote Elect Vote";
" Code Name for #1 for #2 for #1 for #2";
"----- ------- --------- --------- ---------- ---------";

switch (sc1)
{ case 'A' : switch (sc2)
{ case 'B': cout << "Alabamba";
inFile >> pv1;
inFile >> pv2;
break;
case 'L':
break;
}
break;
{ case 'D' : switch (sc2)
{ case 'O':
break;
case 'W':
break;
}

return 0;
}



I'm trying to open a file and print out input from the file, and I'm no sure if I'm doing it right.
Oct 26 '10 #1
2 5627
I found the reason for the error and I fixed it, now I'm having a problem writing the actual program. I'm not quite sure how to print out the data from the file
Oct 26 '10 #2
zoxaku
1
how do u fix it pleas helpme
Jan 5 '12 #3

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

Similar topics

1
by: Egil M?ller | last post by:
I'm developing a larger Python program, and one component (a text parser for a networking protocol) happend to be terribly slow, while quite a simple piece of code, so I decided to reimplement it...
2
by: Itjalve | last post by:
This gives me a fatal error. I'm using .NET VC7.1 and made a win32 consol app, I have no problems with VC6. Debug build. I have removed nearly all my code this is whats left. From the beginning...
4
by: ARF | last post by:
I'm testing AutoCAD 2005 automation via VS2005 Pro C++/CLR and I'm getting fatal compiler errors. I start with a default C++/CLR class library project and modify it by adding the following...
0
by: Raheemulla Khan | last post by:
i have created wsdl file by running the following url http://localhost:8080/axis4/services/MyService?wsdl next i run "c:\java org.apache.axis.wsdl.WSDL2Java MyService.wsdl" it is giving...
5
by: singhm | last post by:
Anybody know how to fix this?????????? ERROR: 1>c:\cs 140\assignment 5\assignment 5\main.cpp(88) : fatal error C1075: end of file found before the left brace '{' at 'c:\cs 140\assignment...
9
by: java | last post by:
Hey there, I just removed an elderly PHP4-Installation from my Windows-Box and installed PHP 5.2.1. I used the PHP4-Module as local batchfile- interpreter by E:\ersDHCP>php ./extractLog.php ...
1
by: kvarada | last post by:
Hello Experts, I am building my application on WinNT.4.0_i386_MSVC.7.1 platform. When I build the application on a stand alone machine, it builds fine. But when I build the same application from a...
5
by: phpbilder | last post by:
dear friends, i am using visual studio php from jcx software (version 5.2.5) and apache from apache friends.com (version 1.6.6a), now i am trying to transform a xml document to a xsl...
1
by: yasoof0wnz | last post by:
I tried a lot of things to fix this statement but every time i try fixing it, i get more errors, so i undo. Heres the error: fatal error C1075: end of file found before the left brace '{' at...
15
by: MKO32 | last post by:
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.