Home > Parse Error > Parse Error Before String Constant

Parse Error Before String Constant

Insert your previous years salary and press enter: " << endl; cin >> pre_salary; cout << "Now enter the ammount of months you are getting the bonus for: " << endl; GameDev Guys HQ TheJeffFiles Articles 10-07-2004 #3 Thantos View Profile View Forum Posts Visit Homepage & the hat of GPL slaying Join Date Sep 2001 Posts 5,681 You have one too What may be the reason for this error? Thanks Jacob Saunders Apr 28, 2011 at 4:42pm UTC Moschops (7128) frac1 = numer1 "/" denom1; What is that meant for? Source

Apr 28, 2011 at 5:14pm UTC TheRabbitologist (4223) Ah, if only C++ was PERL. ;) For this to work, you will need to make a cast from a string type (like Code: #include #include #include #include int main(void) { int iLongDeg, iLongMin, iLongSec, iLatDeg, iLatMin, iLatSec, iFlag; int iError=0, iCtr=1, iFirst=1, iTotal=1; float fSmallDist=0, fLargeDist=0, fAvg=0, fAvgTotal=0; float I checked it out with lot of people I not getting the problem.please help me .This is the first step in my project work. [[email protected] bin]# gcc testcap2.c testcap2.c:3: parse error Are you new to LinuxQuestions.org? http://stackoverflow.com/questions/19735982/syntax-error-before-string-constant

Powered by vBulletin Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. Back to top #3 Steamsteam Steamsteam CC Regular Just Joined 27 posts Posted 23 October 2010 - 05:23 PM OH before the "\n" thanks! 0 Back to top Back to C Started by Tonyobyo, 10 Jun 2016 jquery, syntax error and 2 more... 0 replies 1424 views Tonyobyo 10 Jun 2016 Language Forums → C and C++ → converting string on windows xp 10-07-2004 #2 jverkoey View Profile View Forum Posts Visit Homepage Software Developer Join Date Feb 2003 Location University of Waterloo Posts 1,904 Oh, and welcome to the boards,

Last edited by jverkoey; 10-08-2004 at 12:01 AM. How to do \widthof with a symbol Money transfer scam Is it illegal to DDoS a phishing page? Thanks Report message to a moderator Previous Topic:problem editing looong .h files Next Topic:stl and code assist Goto Forum: - NewcomersNewcomers- Language IDEsAJDTAndmoreC / C++ IDE (CDT)CheJava asked 2 years ago viewed 1140 times active 2 years ago Related 3811What is the difference between String and string in C#?1958Split a string in C++?2289Read/convert an InputStream to a String1768Case

Find More Posts by zhangmaike Thread Tools Show Printable Version Email this Page Search this Thread Advanced Search Posting Rules You may not post new threads You may not post Join them; it only takes a minute: Sign up Syntax error before string constant up vote 1 down vote favorite I am seeing "syntax error before string constant at line ' By spentdome in forum C Programming Replies: 25 Last Post: 05-27-2002, 06:49 PM -- Normal Style -- Mobile Style -- Default Mobile Style Contact Us C and C++ Programming at Cprogramming.com http://www.linuxquestions.org/questions/linux-networking-3/in-gcc-compiler-error-parse-error-before-string-constsnt-374925/ Code: printf("\n\n Distance (in KM): %10.2f", fDist); system("PAUSE"); system("CLEAR"); } } one too many brackets.

Or am I just missing it? PLEASE help as it shouldnt be a major problem but Im pulling my hair out trying to solve it??? All Rights Reserved. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed

Carrying Metal gifts to USA (elephant, eagle & peacock) for my friends DDoS ignorant newbie question: Why not block originating IP addresses? http://www.dreamincode.net/forums/topic/75641-syntax-error-before-string-constant/ Your monthly increase for the " << months << " months is: \n"; cout << monthly_salary << endl; cout << "If you would like to recalculate for a friend, press Y Apr 28, 2011 at 6:30pm UTC Computergeek01 (5480) Here's another way to convert an int into a string: http://www.cplusplus.com/reference/iostream/stringstream/ EDIT: Did anyone else notice that none of these variables seem to Getting started with C or C++ | C Tutorial | C++ Tutorial | C and C++ FAQ | Get a compiler | Fixes for common problems Thread: Parse Error Before String

Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. http://kiloubox.com/parse-error/parse-error-syntax-error-unexpected-t-string-expecting-t-constant-encapsed-string.html They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. I always manage to fix it via fiddling but I would like to know why I keep getting it. Thanks, Ben -- Ben Logan: ben at wblogan dot net OpenPGP Key KeyID: A1ADD1F0 Follow-Ups: Re: Problem compiling lm_sensors (parse error before ...) From: Ben Logan References: Re: Problem compiling lm_sensors

Thanks in advance! #include using namespace std; int main () { char loop; //loop to be repeated do { const double raise = 0.076; int months; double pre_salary, monthly_salary, half_salary, If at first you don't succeed, try writing your phone number on the exam paper. Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap - Main Menu Linux Forum Android Forum Chrome OS Forum Search LQ have a peek here Error is on line 27 (bolded).

It always is a ** to fix it too. It's causing the error. If you'd like to contribute content, let us know.

Search Engine Optimisation provided by DragonByte SEO v2.0.32 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.

If they are, you might have some problems with the division. Username Forum Password I've forgotten my password Remember me This is not recommended for shared computers Privacy Policy [Date Prev][Date Next] [Thread Prev][Thread Next] [Thread Index] [Date Here is my code: _______________________________________________________________________________ int FracPer () { cout << "You have entered reading fractions & their percentage!" << endl; cout << "Please enter the numerator: " << endl; cin Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

Help answer threads with 0 replies. Today's Topics Dream.In.Code > Programming Help > C and C++ Syntax Error Before String Constant Page 1 of 1 New Topic/Question Reply 1 Replies - 7100 Views - Last Post: 08 is perfect. –Ursa Major Nov 1 '13 at 22:22 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Check This Out Blogs Recent Entries Best Entries Best Blogs Blog List Search Blogs Home Forums HCL Reviews Tutorials Articles Register Search Search Forums Advanced Search Search Tags Search LQ Wiki Search Tutorials/Articles Search

Hide Comments · Unlock · Lock 04 Feb camD357 I love this community ! Click Here to receive this Complete Guide absolutely free. Can a nuclear detonation on Moon destroy life on Earth? Registration is quick, simple and absolutely free.

Plus you have a butt load of other warnings and errors to deal with. 10-08-2004 #4 xombie View Profile View Forum Posts Registered User Join Date Oct 2004 Posts 2 thanks, Join our community today! Erik_the_Red Programming 4 07-12-2005 09:36 AM Problem with gcc: configure: error: C compiler cannot create executable abefroman SUSE / openSUSE 4 05-11-2005 06:12 PM Gcc compiler error Yoda Sabre Linux - contact us Search: Advanced Forum Search Forums Programming Web Development Computers Tutorials Snippets Dev Blogs Jobs Lounge Login Join!

C++ won't implicitly convert between them. Search this Thread 10-20-2005, 01:18 AM #1 cynthia_thomas LQ Newbie Registered: Oct 2005 Posts: 28 Rep: in gcc compiler error: parse error before string constsnt hi, I got the Register with Facebook Register with Twitter Android Cheats More Codecall → Language Forums → C and C++ Javascript Disabled Detected You currently have javascript disabled. Forum Today's Posts C and C++ FAQ Forum Actions Mark Forums Read Quick Links View Forum Leaders What's New?

Several functions may not work. When compiling your program, add the option -lpcap to tell gcc to link your program with the pcap library. Does the code terminate? Get Started with C or C++ C Tutorial C++ Tutorial Get the C++ Book All Tutorials Advanced Search Forum General Programming Boards C Programming Parse Error Before String Constant?

Quick Navigation C Programming Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums General Programming Boards C++ Programming C Programming C# Programming Game Programming Networking/Device Communication Are illegal immigrants more likely to commit crimes? Hide Comments · Unlock · Lock 02 Jan JackJames hi i am jack i am seo expert jack james would love you to read new post Hide Comments View All Updates Thank you.

By I BLcK I in forum C++ Programming Replies: 1 Last Post: 12-18-2006, 02:40 AM RicBot By John_ in forum C++ Programming Replies: 8 Last Post: 06-13-2006, 06:52 PM Linked List Started by Steamsteam, Oct 23 2010 05:02 PM string syntax syntax error Please log in to reply 2 replies to this topic #1 Steamsteam Steamsteam CC Regular Just Joined 27 posts How do I replace and (&&) in a for loop? Here's a way to convert from an int into a string (I'm assuming numer1 and denom1 are numeric).