473,326 Members | 2,805 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,326 software developers and data experts.

I got the error syntax error before string constant what do I do about it?

I am a noob and was wondering how to fix this problem Error: syntax error before string constant I am trying to write the simple hello world code
here it is

#include "stdlib.h"

int main ()
"using namespace std;"
{
cout << "hello world!" ;
cin.get ();
return 0;
}
I copyed off a tutorial from youtube and I am not sure how to get it working
Dec 30 '10 #1
2 5058
whodgson
542 512MB
i think "using namespace std" should be declared above the main function
Dec 31 '10 #2
weaknessforcats
9,208 Expert Mod 8TB
Nope.

using namespace std is in the correct spot.

However, it is not a string so remove the quotes.
Jan 1 '11 #3

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

Similar topics

3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
8
by: Wescotte | last post by:
The error message Parse error: syntax error, unexpected $end in FILE on line X is one I run into frequently and I know the cause is I missed an ending quote. Is there an easy way to determine...
36
by: rhys | last post by:
My Gurus and Angels -- Please pardon this old-school programmer, only recently enlightened to open-source, having been trapped in the convenience of proprietary lingos for way too long. My...
3
by: ollii | last post by:
im creating a iterrative server and i get this error error: syntax error before numeric constant and this errors occurs near this line: int listen(sock,5); need help
1
by: james2432 | last post by:
Parse error: syntax error, unexpected T_VARIABLE in /var/www/LukeSite/validateform.php on line 27 validateform.php <?php session_start(); if(empty($_SESSION)||!isset($_SESSION)){...
3
paulrajj
by: paulrajj | last post by:
hi to all, i am getting syntax error on my code.. Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in D:\xampp\htdocs\Dummy\paulraj\matrim\exam.php on line 62 ...
10
by: benicio | last post by:
Parse error: syntax error, unexpected T_STRING, expecting '(' in C:\wamp\www\study_group\includes\functions.php on line 19 I got this error and this syntax is from 8 to 19th line. <?php ...
3
by: brkseven | last post by:
Looking for help with this Contact Form. The error is on line 1, but that' doesn't mean a lot, I think. In fact, a php syntax check passed it, but I was hoping for an easy syntax error, it looks...
13
Topbidder
by: Topbidder | last post by:
I have this error on the code Parse error: syntax error, unexpected '"' in /home/topbidd/public_html/bid2/bid_classic.php on line 159 now i thought the error was this It seems that the...
5
by: vultren | last post by:
Parse error: syntax error, unexpected $end in I keep getting that, I have no clue where to fix it. Any help would be VERY APPRECIATED! <?php if(isset($_POST)) { // EDIT THE 2 LINES...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.