By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,246 Members | 1,480 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,246 IT Pros & Developers. It's quick & easy.

Please help

P: n/a
I am new to C++ Programming. So my question is Can we write a function
to use it in program?
Oct 13 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On 2008-10-13 18:32, re*************@gmail.com wrote:
I am new to C++ Programming. So my question is Can we write a function
to use it in program?
Yes, see http://www.parashift.com/c++-faq-lite/how-to-post.html

--
Erik Wikström
Oct 13 '08 #2

P: n/a
re*************@gmail.com wrote:
I am new to C++ Programming. So my question is Can we write a function
to use it in program?
The answer is "yes, we usually can". If you need a more specific
answer, you should ask a more specific question.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Oct 13 '08 #3

P: n/a
re*************@gmail.com wrote:
I am new to C++ Programming. So my question is Can we write a function
to use it in program?
Yes. Could you please be more specific about what you would like your
program to do? It will help if you can post a small example of the code
you have already tried.
Oct 13 '08 #4

P: n/a
On Oct 13, 10:32 am, "reepakmajhi....@gmail.com"
<reepakmajhi....@gmail.comwrote:
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?
Oct 13 '08 #5

P: n/a
On Oct 13, 2:24*pm, chujiacheng <chujiach...@gmail.comwrote:
On Oct 13, 10:32 am, "reepakmajhi....@gmail.com"

<reepakmajhi....@gmail.comwrote:
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!
Oct 14 '08 #6

P: n/a
On Oct 13, 11:30 pm, "ml...@mitrionics.com" <ml...@mitrionics.com>
wrote:
On Oct 13, 2:24 pm, chujiacheng <chujiach...@gmail.comwrote:
On Oct 13, 10:32 am, "reepakmajhi....@gmail.com"
<reepakmajhi....@gmail.comwrote:
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();
}
Oct 14 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.