Noob as it gets

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2007
Posts: 39
Reputation: Tom Tolleson is an unknown quantity at this point 
Solved Threads: 0
Tom Tolleson's Avatar
Tom Tolleson Tom Tolleson is offline Offline
Light Poster

Noob as it gets

 
0
  #1
Sep 14th, 2009
Hey, guys. I've decided to learn C++ for fun while we're having some downtime here at work.

I'm using Microsoft Visual C++ and it doesn't explain a couple of bits of basic syntax:

On the line

int main ()

What does "int" stand for? It seems to be used for an integer variable elsewhere. And what are the parentheses for? In case I want to set some parameters?

Thanks!

Tom
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 677
Reputation: Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold 
Solved Threads: 101
Sky Diploma's Avatar
Sky Diploma Sky Diploma is offline Offline
Practically a Master Poster

Re: Noob as it gets

 
0
  #2
Sep 14th, 2009
Well , if you have started C++ right now , It would be hard to understand what int main () stands for, Most books explain the code as the place where the execution of the program begins.

And I tend to prefer it to be that way, until you get to "functions" . Once you are pretty much aware about functions , you will see that it all comes into place,
If you have already studied functions suggestion to you would be to consider revising through the book that you are reading and look again into Functions.

For a good reference you could use the basics of functions Here

[EDIT]
AND THEN if you have a doubt, you are always welcome to ask [/Edit]
Last edited by Sky Diploma; Sep 14th, 2009 at 1:44 pm.
1. Please Mark Your Thread as Solved After Getting Your Answers.
2. Please Use CODE TAGS .
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 39
Reputation: Tom Tolleson is an unknown quantity at this point 
Solved Threads: 0
Tom Tolleson's Avatar
Tom Tolleson Tom Tolleson is offline Offline
Light Poster

Re: Noob as it gets

 
0
  #3
Sep 14th, 2009
Originally Posted by Sky Diploma View Post
Well , if you have started C++ right now , It would be hard to understand what int main () stands for, Most books explain the code as the place where the execution of the program begins.

And I tend to prefer it to be that way, until you get to "functions" . Once you are pretty much aware about functions , you will see that it all comes into place,
If you have already studied functions suggestion to you would be to consider revising through the book that you are reading and look again into Functions.

For a good reference you could use the basics of functions Here

[EDIT]
AND THEN if you have a doubt, you are always welcome to ask [/Edit]
I'm starting the chapter on functions now! I'm sure I'll have a grip on this by the end of the day.

Thanks so much for your helpful reply!

Tom
Reply With Quote Quick reply to this message  
Reply

Tags
c++intmain()

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for c++intmain()
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC