[x]
Ever Worried about Missed / Lost Mobile Phone (or) Mobile Phone Theft ?
Use GinGly to Save your Mobile Numbers and Useful Messages
Limited Time Free Access .Hurry Up !!!


Login with username, password and session length
Resend Activation Email | Forgot your Password?
Join IT Acumens Discussion Zone Free!

Share this topic on FacebookShare this topic on MySpaceShare this topic on Del.icio.usShare this topic on DiggShare this topic on RedditShare this topic on StumbleUponShare this topic on TwitterShare this topic on TechnoratiShare this topic on MagnoliaShare this topic on GoogleShare this topic on Yahoo

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Declaration part in C++  (Read 231 times)

Offline sukishan

  • Hero Member
  • *****
  • Posts: 2918
  • Acumen
    • View Profile
Declaration part in C++
« on: July 10, 2009, 09:57:37 PM »
Declarations

A declaration creates a type, object, or function and gives it a name. The syntax is a type name followed by a list of objects with possible modifiers and initializers applying to each object. A name consists of upper or lowercase letters, digits, and underscores (_) with a leading letter. (Leading underscores are allowed but may be reserved). An initializer appends the form =x where x is an expression, or (x,y) for a list of one or more expressions. For instance,

  string s1, s2="xxx", s3("xxx"), s4(3,'x'), *p, a[5], next_Word();

declares s1 to be a string with initial value "", s2, s3, and s4 to be strings with initial value "xxx", p to be a pointer to string, a to be an array of 5 strings (a[0] to a[4] with initial values ""), and next_Word to be a function that takes no parameters and returns a string.
A good beginning makes a good ending