---
title: "How to call a function in c  ?"  
description: "How to call a function in c  ?"  
author: "Dag Hammarskjold"  
published: 2013-06-13  
updated: 2013-06-14  
canonical: https://www.mindstick.com/forum/1066/how-to-call-a-function-in-c  
category: "visual c++"  
tags: ["visual c++"]  
reading_time: 1 minute  

---

# How to call a function in c  ?

Hi All,\
I'm new in [C++](https://www.mindstick.com/blog/745/array-in-c-plus-plus) [language](https://www.mindstick.com/startup/28/preply-the-fast-growing-platform-transforming-language-learning), so there are some problem. Basically I have created one [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) in C++ successfully but how and where write line of [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) for calling that function. Please provide [useful](https://www.mindstick.com/articles/12694/how-dolomite-mineral-is-useful-in-human-life) line of code.\
Thanks in advance.

## Replies

### Reply by AVADHESH PATEL

try as following:\

```
class myclass{public:show( );};myclass:: show( ){cout<<"In function\n";}int main( ){myclass obj;obj.show( );}
```


---

Original Source: https://www.mindstick.com/forum/1066/how-to-call-a-function-in-c

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
