Fedora Linux Support Community & Resources Center
  #1  
Old 24th January 2009, 02:33 PM
gowrishankar Offline
Registered User
 
Join Date: Jan 2009
Posts: 17
error: expected ‘;’ before ‘(’ token in c++

Hello
iam using sulphur....i was trying to create a file in c++ using the statement
fstream &myFile("file.txt");

and i got the following error

error: expected ‘;’ before ‘(’ token


help me to get through this problem..

thanks in advance
Reply With Quote
  #2  
Old 24th January 2009, 02:36 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
Try with this one:
Code:
fstream myFile("file.txt", ios::in | ios::out);
without the "&" and with open-mode flags.

bye!!!!!!
Reply With Quote
Reply

Tags
error, expected, token

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
passwd: Authentication token manipulation error phildog Using Fedora 8 7th October 2011 08:24 AM
Implementing Token ring Beagleboy Servers & Networking 2 23rd March 2009 02:19 PM
winecfg error fscanf returns 1, expected 2 sdowney717 Using Fedora 7 4th July 2007 03:33 PM
"expected specifier-qualifier-list" ERROR while adding a new system call ahm_irf Programming & Packaging 0 30th April 2007 05:49 AM
Installation Error: MD5 digest: BAD Expected [INTEL FORTRAN COMPILER] aftab Installation, Upgrades and Live Media 5 28th February 2006 04:08 PM


Current GMT-time: 04:12 (Friday, 28-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletinฎ Copyright ฉ2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Tsuen Wan Station