I cannot understand user defined functions in c++? Please give suggestions or refer any book or website where I can learn User - defined functions in C++?

Recommended Answers

All 3 Replies

Example (in a .cpp or .cc file):

void myHelloWorld(void)
{
    std::cout << "Hello World!" << std::endl;
}
int main(void)
{
    myHelloWorld();
    return 0;
}

follow the book "C++ how to programme" by dietel 9th edt

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.