Ecco il mio codice. Quando compilo tutti i file ottengo questo errore, non sono sicuro di cosa sto facendo male. Si prega di avvisare.Errore nel compilatore C++: "specifica del tipo di ritorno per costruttore non valido"
Molecule.cpp:7:34: error: return type specification for constructor invalid
//Sunny Pathak
//Molecule.cpp
#include <iostream>
#include "Molecule.h"
using namespace std;
inline void Molecule::Molecule(){
int count;
count = 0;
}//end function
bool Molecule::read(){
cout << "Enter structure: %c\n" << structure << endl;
cout << "Enter full name: %c\n" << name << endl;
cout << "Enter weight : %f\n" << weight << endl;
}//end function
void Molecule::display() const{
cout << structure << ' ' << name << ' ' << weight << ' ' << endl;
}//end function
-1 per titolo inutile. – jogojapan
@jagojapan Potrebbe essere più costruttivo modificare il titolo (come ha fatto sgar91). Questa domanda è utile ed essere così non dovrebbe essere downvoted, mi ha solo aiutato a trovare uno stupido errore. – Antonio