---
title: "constructor shown in the following fragment in c plus plus?"  
description: "constructor shown in the following fragment in c plus plus?"  
author: "Anonymous User"  
published: 2013-06-14  
updated: 2013-06-15  
canonical: https://www.mindstick.com/forum/1106/constructor-shown-in-the-following-fragment-in-c-plus-plus  
category: "visual c++"  
tags: ["visual c++"]  
reading_time: 1 minute  

---

# constructor shown in the following fragment in c plus plus?

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances),\
What [wrong](https://answers.mindstick.com/qa/48468/who-wrote-the-the-wrong-enemy-america-in-afghanistan-2001-2014-and-when) with constructor shown in the following [fragment](https://www.mindstick.com/forum/12894/how-to-force-recreation-of-activity-fragment-on-restore) in [C++](https://www.mindstick.com/blog/745/array-in-c-plus-plus)?\
[class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) [sample](https://www.mindstick.com/news/2174/mars-mission-by-nasa-prepares-for-tests) {double a,b,c;[public](https://www.mindstick.com/blog/11097/java-access-modifiers-the-public-and-the-private-modifiers):double sample( );} \
Thanks in advance.

## Replies

### Reply by AVADHESH PATEL

Hi Goti,\
Constructor has no return type,so after correction \
**class sample****{****double a,b,c;****public:****sample( );****}**


---

Original Source: https://www.mindstick.com/forum/1106/constructor-shown-in-the-following-fragment-in-c-plus-plus

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
