User Profile

Collapse

Profile Sidebar

Collapse
selriel
selriel
Last Activity: Dec 5 '07, 04:27 PM
Joined: Dec 2 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • selriel
    replied to problems with forward declaration
    in C
    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.
    See more | Go to post

    Leave a comment:


  • 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");...
    See more | Go to post

    Leave a comment:


  • selriel
    replied to problems with forward declaration
    in C
    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...
    See more | Go to post

    Leave a comment:


  • selriel
    started a topic problems with forward declaration
    in C

    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->...
    See more | Go to post
No activity results to display
Show More
Working...