tutorial,been,made,programmers,Unfortunately,
Quick Search for:  in language:    
tutorial,been,made,programmers,Unfortunately,
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
C/ C++ Stats

 Code: 488,676 lines
 Jobs: 1,067 postings

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for C/ C++.
Asm in C++
By _AuC_ on 10/28


Non Fibanocci Generator
By Rishabh M on 10/28


GDI+ create, draw and save images
By __kreischweide on 10/27


Calculator v02 by: chris eckhard
By chris ec on 10/27


wonderful analog clock
By vaibhav shintre on 10/27


Absolute Security - Hidden Diskette
By Sharp Avenger on 10/27


Simple FTP Passive Upload Class (PASV PUT)
By __kreischweide on 10/27


String component counter
By Rishabh M on 10/27


Click here to see a screenshot of this code!MFC Othello v1.21
By Lam Wai Hang on 10/26

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Tutorial 2

Print
Email
 

Submitted on: 9/21/2000 9:36:38 AM
By: Amin Patel1 
Level: Beginner
User Rating: By 34 Users
Compatibility:C++ (general), Microsoft Visual C++, Borland C++, UNIX C++

Users have accessed this article 21990 times.
 
(About the author)
 
     This tutorial has been made for new c++ programmers. Unfortunately their are many great minds out there but they don't have access to free and quality c++ tutorials.

 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
Tutorial 2- By: Amin Patel     About Me  
c, c++, c__,tutorial,been,made,give,introduction,programm

 Planet Source Code -                      Start with a prayer to God, that you “Succeed in learning C++"

 
 
Advanced Search
 Tutorials:
Tutorial 1 Tutorial 3


Only at PS Code

Code of the Day
To join the 'Code of the Day' Mailing List click here!

 

Thank you for coming to Planetsourcecode 

Almost every time the teacher gives lesson in school, we might copy everything from the board or make notes over what is taught. There is a similar thing we call in c++, ‘Comments’. Comments can be used for different purposes.

·        The most obvious one, to recall the purpose of the code (Say you are referring to it after 6 months, makes less sense then. If you don’t include a comment.)

·        Helps your computer teacher know what you have actually written. Just kidding.

·        Now this one is an unobvious reason. Sometimes after compiling you might want to remove some line just to see how your pr // ogram works then, without deleting the actual code.

·        The final one, just a good programming style to express your thoughts.

 

Comments can be written anywhere in the program (Good Feature). They don’t effect your code, unless you comment out something by mistake. 

 

There are two types of comments:

 

  1. C Style: 

/* You can write anything that makes sense here */

 

After the introduction of c++ it just become a norm for programmers to ‘Comment out’, huge parts of their code using this style. The initial part (/*) and the final part(*/) can be on separate lines.

  

  E.g.:

  1. #include <iostream.h>
  2.  int main()
  3. {/*
  4. cout<< “ This whole line gets, commented out!”;*/
  5. }

 

 

 

 

<Warning: The numbered indentation is not to be included with the code while typing. It is only for your convenience>

 

 

  1. C++ Style

 

// After the 2 slashes, you can type anything that makes sense.

 

This comment style is used more often these days but please note that if your comment sentence goes over many lines, please use // on each line at the beginning.

  E.g.:

  1. #include <iostream.h>
  2.  int main()
  3. {
  4. cout<< “How are you I am fine”;
  5. // Line 4 will print 
  6. //“How are you I am fine, to the screen.
  7. // Notice that 
  8. //I placed the 2 slashes on this line too.
  9. }

 

 

 

   
Note: If anything appears wrong, it is due to the incompatibility of the browser.
For compiler compatibility issues please refer to tutorial 3
Users of Netscape have complained regarding misprinting of C++ style comments but I can't verify that since I use IE, but kudos to the Netscape user helping me solve the endless comments problem due to browser incompatibility. 
<-- content_end-->

_______________________________________________________________________

  If you like this code please give me a good message.  If you have gained some knowledge from this tutorial please make me happy, by giving me an “excellent rating”. That's all I ask.

_______________________________________________________________________

 Tutorial 2 - By: Amin Patel

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | C/ C++ Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising

   C++ - Tutorials

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.   By using this site you agree to its Terms and Conditions.   Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.


Other 3 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
9/21/2000 5:43:15 PM:krane
keep these tutorials coming!@#@! this is what i have been looking for and im sure alot more people are too@#@!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/21/2000 10:56:31 PM:Amin Patel
Thank you very much!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/5/2000 10:43:52 PM:Ian Ippolito
I've just removed a slew of off-topic comments. Ian PSCode Admin
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/8/2000 9:30:58 PM:Sebastian
Very nice and clean article, just can't wait until the little more advanced stuff comes :-)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/9/2000 9:34:16 AM:Koeter
Nice Tut ! I#d like to see more :o)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/16/2000 10:21:00 AM:Roland
Nice tutorial. I am not new to programming, but I am new to C++. The few books I've picked up on the subject are indepth, but lack the 'being schooled' programmer's perspective. Keep up the good work and I'll be tuning in for future tutorials!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/21/2001 7:59:24 PM:Craig
Good approach for beginners! Your tutorial taught me how to use my command-line compiler (although I now use Dev-C++[great IDE]) I think some links would be helpful, as well as some terminology so the people you start off can learn more. PS. do you know of a good non-MFC Win32 API tutorial?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/21/2001 8:01:46 PM:Craig
Good approach for beginners! Your tutorial taught me how to use my command-line compiler (although I now use Dev-C++[great IDE]) I think some links would be helpful, as well as some terminology so the people you start off can learn more. PS. do you know of a good non-MFC(vc++) Win32 API tutorial?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/25/2001 9:03:28 PM:Daza
These tutorials r great i have learnt stacks. keep them coming. 10/10 Daza
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/1/2001 7:54:17 AM:Tore
Thanks for the tutorial. "Moo i am a flying cow mooo", .
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/11/2001 3:09:14 PM:imn0thing
this tutorial does nothing but show how to use comments. and besides that, your explanation is ridiculously poor. why are people voting anything above 1 for your tutorials?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/13/2002 10:20:06 AM:john gibson
I have done a fair bit of c and vb and am now about to learn c++. I've already started reading and experimenting a bit and with my knowledge of c, there was nothing new here for me. However, this is a fact, not a negative comment. It seems amazing to me how a school pupil can give an outline of the basics in such a clear and concise way where many (or almost all) of the books I've looked at are so confusing. This will be a great help for those without pre-existing knowledge of c or c++. Well done.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | C/ C++ Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.