473,396 Members | 2,061 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.

Declaration Error, C++

Kindle Life 123
I have typed in a function,but it shows declaration error.

here is the function:

void writeinto()
{
club c;
int N,i;
{
ofstream fout("project.dat",ios::binary);
{
if(!fout)
{
cout<<"Error";
exit(0);
}
while(!fout.eof())
{
cout<<"Enter the number of records to be entered";
cin>>N;
{for(i=0;i<N;i++)
c.enterdata();
fout.write((char*)&c,sizeof(c));
}
fout.close();
}}}
Sep 19 '18 #1
3 1568
weaknessforcats
9,208 Expert Mod 8TB
What was the error?

I assume you have #included declarations for club, iostream.

and you are using namespace std.
Sep 19 '18 #2
My compiler is turbo c++ 4.5. So it runs without namespace std.
the error is not specified.
Should I include void club::writeinto()?
Sep 21 '18 #3
Thanks a ton for all your efforts...
Sep 21 '18 #4

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

Similar topics

6
by: Jst | last post by:
Do you need programming help? If so, pop along to our new forum and post your questions to our qualified developers. http://forum.elistarcreations.com
10
by: Rohit | last post by:
I need some ideas on how to write a program that could -- Read an MS Access database and grab information say Vehicle year, vehicle make -- Make a call to a website and enter the information...
3
by: Spartan815 | last post by:
I am writing a program that does a command line search for a specified file, or to match a pattern (i.e. search for *.h). Once it finds the file(s) it has to output absolute pathname, size, owner...
4
by: Scott C. Reynolds | last post by:
I need to do something in an asp.net application to get shipping costs from UPS. a)does anyone have any C# code for this? That would be immensely helpful as then I could examine it and apply it...
0
by: nimisha | last post by:
I'm only new to learning shell programming and we have this current task to create a .sh program (basic shell only) that can output a web access statistics report of accesses for each month in a year...
3
by: lavender | last post by:
C programmingBelow is my question and the code, but I donno the code is correct or not, can anyone please help me to correct it if I wrong. Write a program that will swap two values in an array....
4
by: crookj | last post by:
I was wondering how i can program in pcl to shift my text 10mm to the right and 6mm up. This would include all text. I print out a form and everything is shifted down and to the right. was...
1
by: alibaaba | last post by:
HI All, i am a 4th year business student and i took web design online course for fun however i did not see that last 2 chapters were python programming.This has no relevance to my major nor does...
1
by: Dennis | last post by:
HI All, i am a 4th year business student and i took web design online course for fun however i did not see that last 2 chapters were python programming.This has no relevance to my major nor does...
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: 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
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
isladogs
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...

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.