c++ - Undeclared Identifier with all the right includes -
everytime try build program error:
error c2065: 'depositofresco' : undeclared identifier
this happens every instance create of depositofresco
, depositonormal
, deposito
. depositonormal
, depositofresco
subclasses of deposito
(virtual class). have right includes don't know what's causing this. error occurs in class 'armazem' instantiate several of these insert in vectors , such. here's code:
armazem::armazem(int nf, int nn, int npf, int npn, int distmaxi, int distmini) : depositos(), distancia(), graphstlpath <deposito*, int>() { distmax = distmaxi; distmin = distmini; (int = 0; < nf; i++) { depositofresco* df = new depositofresco(random(1, 20), (float)random(1000, 10000), npf); depositos[i] = df; } (int j = nf; j < nf + nn; j++) { depositonormal* dn = new depositonormal(random(1, 20), (float)random(1000, 10000), npn); depositos[j] = dn; } preenchermatriz(); }
also, armazem
subclass template class called graphstlpath
don't think problem here.
edit: here includes:include "deposito.h" include "depositofresco.h" include "depositonormal.h" include "graphstlpath.h" include <vector> include <map> include <stdlib.h> include <stdio.h> include <time.h> include <typeinfo> include <iostream> include <fstream> include <string>
any finding problem apreciated.
my psychic debugging powers tell me have cycle in includes, , header guards or #pragma once
kicking in, making code disappear compiler.
that, or not respecting namespaces. first 1 more likely.
Comments
Post a Comment