Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


I don't know why I have a error! :(

  • Please log in to reply
3 replies to this topic

#1 sharly55


  • Members
  • 35 posts
  • Gender:Male
  • Location:Mexico
  • Local time:05:39 AM

Posted 21 July 2014 - 11:48 PM

I'm trying to learn c++ and I tried to do this example but when I try to build this give me a error


this is my code


1 #include <stdio.h>
2 #include <stdlib.h>
4 int main()
5 (
6  printf("Hola Mundo");
7  system("PAUSE");
8  return 0;
9 )
and this are the errors
|File                                              |Line|  Message 
|C:\Users\Antonio\Desktop\lol.cpp|  7   |error: expected constructor, destructor, or type conversion before '(' token|
|C:\Users\Antonio\Desktop\lol.cpp|  8   |error: expected unqualified-id before 'return'|
|C:\Users\Antonio\Desktop\lol.cpp|  9   |error: expected unqualified-id before ')' token|
What I did wrong?

BC AdBot (Login to Remove)


#2 Sirawit


    Bleepin' Brony

  • Malware Response Team
  • 4,161 posts
  • Gender:Male
  • Location:Thailand
  • Local time:06:39 PM

Posted 22 July 2014 - 12:43 AM

To open and close functions, you need to use {} brackets, not ().


Thank you.

If I don't reply back to you in 2 days, feel free to send me a PM.


“You’re lying… just like you were lying to me before. You have to hate me. I’ve been the worst daughter in the world… you should hate me.”

“But I don’t, Nyx. Because, Nyx, I’m your mother, and a mother will always love her daughter, no matter what.” -Past sins by Pen stroke.

#3 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer

  • Malware Response Team
  • 12,304 posts
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:04:39 AM

Posted 22 July 2014 - 11:51 AM

Go curly braces! :D

Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#4 sharly55

  • Topic Starter

  • Members
  • 35 posts
  • Gender:Male
  • Location:Mexico
  • Local time:05:39 AM

Posted 24 July 2014 - 09:00 AM

oops I don't see that was a bracket jeje thanks both for the help

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users