I have two files
graph.cpp
#include <iostream.h>
#include "graph.h"
Graph::Graph(){
cout << "created";
}
graph.h
class Graph{
public:
Graph();
private:
int size;
}
This gives me an error :
error C2533: 'Graph::Graph' : constructors not allowed a return type
Why does it do that? Does VIsual C++ have different syntax than standard C++?
graph.cpp
#include <iostream.h>
#include "graph.h"
Graph::Graph(){
cout << "created";
}
graph.h
class Graph{
public:
Graph();
private:
int size;
}
This gives me an error :
error C2533: 'Graph::Graph' : constructors not allowed a return type
Why does it do that? Does VIsual C++ have different syntax than standard C++?