Salt_Peter
10/14/2008 12:57:00 PM
On Oct 13, 11:30 pm, "ml...@mitrionics.com" <ml...@mitrionics.com>
wrote:
> On Oct 13, 2:24 pm, chujiacheng <chujiach...@gmail.com> wrote:
>
> > On Oct 13, 10:32 am, "reepakmajhi....@gmail.com"
>
> > <reepakmajhi....@gmail.com> wrote:
> > > I am new to C++ Programming. So my question is Can we write a function
> > > to use it in program?
>
> > This question is too general to give you a more specific answer. Can
> > you just give a specified example?
>
> You could give them the generalized form of a function, especially
> having it conform to standard good variable naming conventions, and
> proper indenting. like GNU's "Hello World!"; that is, over-the-top-
> example that definitely drives the point home. i'd do it myself but my
> C++ elements of style book is 10 mi away on my desk!
Then why didn't YOU provide a function example?
You need a style book to provide one? I'm puzzled.
To the OP:
both writing functions and types (struct, classes) is daily duty in C+
+.
You need a good book, which one will depend on what programming xp you
have so far.
If you really need an example:
#include <iostream>
void foo()
{
std::cout << "i'm a foo()\n";
}
int main()
{
foo();
}