Thank you very much. That was the error, i had the methods implemented in the .h. When i splitted the .h and the .cpp it worked alright.
Here in Argentina we would say: Every day you learn something new. Don't implement methods in .h files unless you're makin templates.
User Profile
Collapse
-
try this
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
#define NEWLINE '\n'
int main () {
string line;
char* p;
int i = 0;
ifstream inFile ("test.v");...Leave a comment:
-
Thanks for the reply. Sorry i didn't write the getPosicion() method, it would be like this
-----simMaster.h-----
class Hormiga; //Forward declaration
clas simMaster{
private:
Hormiga* listaHormiga[5];
int pos;
public:
....
void addHormiga (){
for(int i = 0; i<5 ; i++){
this->listaHormiga[i] = new Hormiga();
}
}
int...Leave a comment:
-
problems with forward declaration
Hi I have an error that's making me go crazy. I'll try to explain it the best I can.
I have this class named simMaster
-----simMaster.h-----
class Hormiga; //Forward declaration
clas simMaster{
private:
Hormiga* listaHormiga[5];
public:
....
void addHormiga (){
for(int i = 0; i<5 ; i++){
this->...
No activity results to display
Show More
Leave a comment: